diff options
Diffstat (limited to 'examples/toggle_lights.py')
-rw-r--r-- | examples/toggle_lights.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/toggle_lights.py b/examples/toggle_lights.py new file mode 100644 index 0000000..191cf36 --- /dev/null +++ b/examples/toggle_lights.py @@ -0,0 +1,6 @@ +import ShellyPy + +device = ShellyPy.Shelly("192.168.0.5") # try connecting to the Shelly device under that ip + +device.relay(0, turn=True) # turn the relay at index 0 on +device.relay(0, turn=False) # same as bove but turn it off |