Fix brightness and increase loop timeout

This commit is contained in:
Melissa LeBlanc-Williams 2021-04-13 16:03:49 -07:00
parent 6194978a1b
commit 7061b9fb26

View file

@ -112,9 +112,7 @@ def message(client, topic, payload):
print(settings)
if settings["state"] == "on":
if "brightness" in settings:
funhouse.peripherals.dotstars.brightness = int(
settings["brightness"] // 255
)
funhouse.peripherals.dotstars.brightness = settings["brightness"] / 255
else:
funhouse.peripherals.dotstars.brightness = 0.3
if "color" in settings:
@ -204,4 +202,4 @@ while True:
last_publish_timestamp = time.monotonic()
# Check any topics we are subscribed to
funhouse.network.mqtt_loop(0.25)
funhouse.network.mqtt_loop(0.5)