Compare commits

..

2 Commits

Author SHA1 Message Date
alex f84b52543a await 2026-05-02 23:10:45 -04:00
alex 09df7c6ac3 try to power on then set scene 2026-05-02 23:09:55 -04:00
3 changed files with 12 additions and 5 deletions
+11
View File
@@ -48,6 +48,17 @@ class GoveeApi:
await self.close() await self.close()
async def send_scene(self, scene_code: str): 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(",") segments = scene_code.split(",")
for i, segment in enumerate(segments): for i, segment in enumerate(segments):
payload = {"msg": {"cmd": "ptReal", "data": {"command": [segment]}}} payload = {"msg": {"cmd": "ptReal", "data": {"command": [segment]}}}
+1 -1
View File
@@ -293,7 +293,7 @@ async def run():
while True: while True:
async with govee_api: async with govee_api:
govee_api.send_scene(GOVEE_AWS) await govee_api.send_scene(GOVEE_AWS)
play_goal_celebration() play_goal_celebration()
await govee_api.set_color(255,0,0) await govee_api.set_color(255,0,0)
-4
View File
@@ -1,4 +0,0 @@
import govee
govee_api = govee.GoveeApi(device_ip="172.16.0.15")
govee_api.send_scene("owABAgT/AGQMACr//+YAADb//8k=,o//QAAIDAwAAAAAAAAAAAAAAAI4=,MwUKdwAAAAAAAAAAAAAAAAAAAEs=")