wordclock-dimmer: Reconnect before setting color

Also remove apostrophe that I have no idea how it got there.
This commit is contained in:
Simon Bruder 2021-03-09 08:41:52 +01:00
parent ee31882b9a
commit e0d50e0435
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -13,7 +13,8 @@ def time_as_float_hours(time: datetime.time) -> float:
def set_color(client: mqtt.Client, red: int, green: int, blue: int, retain=True):
# my wordclocks red and green LEDs seem to be switched
client.reconnect()
# my wordclocks red and green LEDs seem to be switched
client.publish("wordclock/color/red", green, retain=True)
client.publish("wordclock/color/green", red, retain=True)
client.publish("wordclock/color/blue", blue, retain=True)