Skip to content

Commit

Permalink
test fire_last_message_received
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed May 13, 2024
1 parent 6e6488b commit 9129e99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/eltako/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ def __init__(self, general_settings:dict, hass: HomeAssistant,

def set_connection_state_changed_handler(self, handler):
self._connection_state_handler = handler
self._fire_connection_state_changed_event()


def _fire_connection_state_changed_event(self, connected:bool):
def _fire_connection_state_changed_event(self):
event_id = config_helpers.get_bus_event_type(self.base_id, SIGNAL_GATEWAY_CONNECTION_STATUS)
dispatcher_send(self.hass, event_id, None)
dispatcher_send(self.hass, event_id, self._bus.is_active())


def set_last_message_received_handler(self, handler):
Expand Down

0 comments on commit 9129e99

Please sign in to comment.