We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5deef69 commit 3afe6cbCopy full SHA for 3afe6cb
yeelight1.py
@@ -0,0 +1,38 @@
1
+# Make sure you install yeelight
2
+# pip3 install yeelight
3
+
4
+# Documentation here: https://yeelight.readthedocs.io/en/latest/
5
6
+import time
7
+from yeelight import Bulb
8
+bulb = Bulb("192.168.0.105")
9
10
+bulb.turn_on()
11
+time.sleep(1)
12
+bulb.set_rgb(255,0,0)
13
14
+bulb.set_rgb(164,168,50)
15
16
+bulb.set_rgb(50,90,168)
17
18
+bulb.set_rgb(168,50,50)
19
20
+bulb.set_rgb(50,168,54)
21
22
23
24
25
+rgb1 = 50
26
+rgb2 = 10
27
+rgb3 = 50
28
+for i in range(10):
29
+ bulb.set_rgb(rgb1,rgb2,rgb3)
30
+ time.sleep(1)
31
+ i = i + 1
32
+ rgb1 = (i*10.5)
33
+ rgb2 = (i*5.5)
34
+ rgb3 = (i*9.5)
35
+ print(rgb1, rgb2, rgb3)
36
37
38
0 commit comments