Skip to content

Commit

Permalink
fix: write event to log if it is not in triggers list
Browse files Browse the repository at this point in the history
Event was missed in log message.
  • Loading branch information
IATkachenko committed May 17, 2021
1 parent 9b933f4 commit fc5f03b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/sleep_as_android/sensor.py
Expand Up @@ -128,7 +128,7 @@ def message_received(self, msg, first: bool = False):
self.hass.bus.async_fire(DOMAIN + "_event", {"device_id": self.device_id, "type": new_state})
else:
_LOGGER.warning("Got %s event, but it is not in TRIGGERS list: will not fire this event for "
"trigger!")
"trigger!", new_state)
except KeyError:
_LOGGER.warning("Got unexpected payload: '%s'", msg.payload)
except json.decoder.JSONDecodeError:
Expand Down

0 comments on commit fc5f03b

Please sign in to comment.