Class: TPLink::RGBLight
Overview
Control TP-Link LS130 / RGB lights
Instance Attribute Summary
Attributes inherited from Device
Instance Method Summary collapse
-
#off ⇒ Object
Turn light off.
-
#on(b = 100, h = 100, s = 100) ⇒ Object
Turn Light on.
-
#toggle ⇒ Object
Toggle device (turn off if on, on if off).
Methods inherited from Device
Instance Method Details
#off ⇒ Object
Turn light off
12 13 14 |
# File 'lib/tp_link/rgb_light.rb', line 12 def off transition_light_state(0, 100, 100, 100) end |
#on(b = 100, h = 100, s = 100) ⇒ Object
Turn Light on
7 8 9 |
# File 'lib/tp_link/rgb_light.rb', line 7 def on(b = 100, h = 100, s = 100) transition_light_state(1, b, h, s) end |
#toggle ⇒ Object
Toggle device (turn off if on, on if off)
17 18 19 20 21 22 23 |
# File 'lib/tp_link/rgb_light.rb', line 17 def toggle if on? off else on end end |