diff options
Diffstat (limited to 'src/relay_mqtt_bot.py')
-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) |