Habe es jetzt selber hinbekommen.
Code
#!/usr/bin/env python3
import ShellyPy
device = ShellyPy.Shelly("192.168.0.150")
deviceMeter = device.relay(0) #request meter information
print(deviceMeter['ison']) #print total informationdevice.relay(0, ison=True)
if (deviceMeter['ison']):
print ("is True")
if not(deviceMeter['ison']):
print ("is False")
Alles anzeigen