aboutsummaryrefslogtreecommitdiff
path: root/examples/relay.py
blob: 36bbe45fc3cf4591d8ee92d1654601e74d46548f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import ShellyPy

device = ShellyPy.api.Device.connect("192.0.0.20")

# turn all relays off
device.relays.off()

# turn all relays on
device.relays.on()

# toggle all relays
device.relays.toggle()

# return relay 0 on
device.relays[0].on()