Compare commits
2 Commits
ea1b2c90ae
...
f84b52543a
| Author | SHA1 | Date | |
|---|---|---|---|
| f84b52543a | |||
| 09df7c6ac3 |
@@ -48,6 +48,17 @@ class GoveeApi:
|
||||
await self.close()
|
||||
|
||||
async def send_scene(self, scene_code: str):
|
||||
power_payload = {
|
||||
"msg": {
|
||||
"cmd": "turn",
|
||||
"data": {
|
||||
"value": 1 # 1 = on, 0 = off
|
||||
}
|
||||
}
|
||||
}
|
||||
self._send(power_payload)
|
||||
time.sleep(0.5)
|
||||
|
||||
segments = scene_code.split(",")
|
||||
for i, segment in enumerate(segments):
|
||||
payload = {"msg": {"cmd": "ptReal", "data": {"command": [segment]}}}
|
||||
|
||||
+1
-1
@@ -293,7 +293,7 @@ async def run():
|
||||
|
||||
while True:
|
||||
async with govee_api:
|
||||
govee_api.send_scene(GOVEE_AWS)
|
||||
await govee_api.send_scene(GOVEE_AWS)
|
||||
play_goal_celebration()
|
||||
await govee_api.set_color(255,0,0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user