File: example-get-data-bulb.py

package info (click to toggle)
python-mystrom 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 328 kB
  • sloc: python: 981; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 455 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""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())