diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-01-04 02:33:26 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-01-04 02:33:26 +0300 |
commit | ee8381f7c5d9646688c5b9295ac7078b42415ba2 (patch) | |
tree | 59822561b0b62b5591605b76b753fbc0bafe8408 | |
parent | 1d508814caba0db6618800291f1581cf30dfb34c (diff) |
relay_mqtt_bot: fix
-rwxr-xr-x | src/relay_mqtt_bot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/relay_mqtt_bot.py b/src/relay_mqtt_bot.py index 6fc981b..33b7e06 100755 --- a/src/relay_mqtt_bot.py +++ b/src/relay_mqtt_bot.py @@ -48,7 +48,7 @@ def on_mqtt_message(home_id, message: MQTTPayload): kwargs = dict(rssi=message.rssi, enabled=message.flags.state) if isinstance(message, InitialStatPayload): kwargs['fw_version'] = message.fw_version - if home_id not in relay_states[home_id]: + if home_id not in relay_states: relay_states[home_id] = MQTTRelayState() relay_states[home_id].update(**kwargs) |