Skip to content

Commit 071ecc2

Browse files
authored
Create yeelight_discover.py
1 parent 8d248f2 commit 071ecc2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

yeelight_discover.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Make sure you install yeelight
2+
# pip3 install yeelight
3+
4+
# Documentation here: https://yeelight.readthedocs.io/en/latest/
5+
6+
from yeelight import discover_bulbs
7+
discover_bulbs()
8+
9+
from yeelight import Bulb
10+
bulb = Bulb("192.168.0.105")
11+
12+
bulb.turn_on()
13+
bulb.get_properties()
14+
bulb.set_brightness(50)
15+
bulb.set_rgb(255, 0, 0)
16+
bulb.set_rgb(1, 0, 0)
17+
18+
bulb.set_color_temp(200)
19+
bulb.set_color_temp(4700)

0 commit comments

Comments
 (0)