File: example-get-data-bulb.py

package info (click to toggle)
python-mystrom 2.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 188 kB
  • sloc: python: 855; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
"""Example code for getting the data from a myStrom bulb."""
from pymystrom import bulb

bulb = bulb.MyStromBulb("192.168.0.51", "5CCF7FA0AFB0")

# Get the details of the bulb
print("Bulb state:", bulb.get_bulb_state())
print("Current color:", bulb.get_color())
print("Brightness:", bulb.get_brightness())
print("Power consumption:", bulb.get_power())
print("Transition time:", bulb.get_transition_time())
print("Firmware version:", bulb.get_firmware())