Claude cleanup

This commit is contained in:
2026-08-26 10:38:56 +02:00
parent bd8925a278
commit 7aa7fe4693
8 changed files with 104 additions and 32 deletions

View File

@@ -2,7 +2,6 @@ from led_cmds import ColorRGBW, EffectStaticConfig, EffectStaticDetailedConfig,
import asyncio
import aiomqtt
import json
from copy import deepcopy
class ShelveLightMqtt:
@@ -155,21 +154,6 @@ class ShelveLightMqtt:
state_payload = json.dumps(self._state)
print("OUT ", state_payload)
await self._mqtt_client.publish(self._discovery_spec['state_topic'], state_payload.encode())
return
direct_ack = False
if direct_ack == True:
state_payload = json.dumps(state)
else:
s = deepcopy(self._state)
if s['state'] == "OFF":
state_payload = json.dumps({"state": "OFF"})
else:
s['color_mode'] = "rgbw"
state_payload = json.dumps(s)
print("OUT ", state_payload)
await self._mqtt_client.publish(self._discovery_spec['state_topic'], state_payload.encode())
async def start_mqtt(music_mouse_protocol, server, username, password):