wordclock-dimmer: Reconnect before setting color
Also remove apostrophe that I have no idea how it got there.
This commit is contained in:
parent
ee31882b9a
commit
e0d50e0435
|
@ -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 wordclock’s red and green LED’s seem to be switched
|
||||
client.reconnect()
|
||||
# my wordclock’s 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)
|
||||
|
|
Loading…
Reference in a new issue