Class: Switchbot::ColorBulb
- Inherits:
-
Object
- Object
- Switchbot::ColorBulb
- Extended by:
- Forwardable
- Defined in:
- lib/switchbot/color_bulb.rb
Instance Method Summary collapse
- #brightness(value) ⇒ Object
- #color(value) ⇒ Object
- #color_temperature(value) ⇒ Object
-
#initialize(client:, device_id:) ⇒ ColorBulb
constructor
A new instance of ColorBulb.
- #toggle ⇒ Object
Constructor Details
Instance Method Details
#brightness(value) ⇒ Object
17 18 19 |
# File 'lib/switchbot/color_bulb.rb', line 17 def brightness(value) commands(command: 'setBrightness', parameter: value) end |
#color(value) ⇒ Object
21 22 23 |
# File 'lib/switchbot/color_bulb.rb', line 21 def color(value) commands(command: 'setColor', parameter: value) end |
#color_temperature(value) ⇒ Object
25 26 27 |
# File 'lib/switchbot/color_bulb.rb', line 25 def color_temperature(value) commands(command: 'setColorTemperature', parameter: value) end |
#toggle ⇒ Object
13 14 15 |
# File 'lib/switchbot/color_bulb.rb', line 13 def toggle commands(command: 'toggle') end |