Fix brightness and increase loop timeout
This commit is contained in:
parent
6194978a1b
commit
7061b9fb26
1 changed files with 2 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue