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 fc0712f commit 53f993f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/eltako/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def set_connection_state_changed_handler(self, handler):


def _fire_connection_state_changed_event(self):
LOGGER.info("Fire message connection state changed")
event_id = config_helpers.get_bus_event_type(self.base_id, SIGNAL_GATEWAY_CONNECTION_STATUS)
dispatcher_send(self.hass, event_id, self._bus.is_active())

Expand Down Expand Up @@ -137,7 +138,8 @@ def process_connection_status_signal(self, data):

def _init_bus(self):
self._received_message_count = 0
# self._fire_received_message_count_event()
self._fire_received_message_count_event()

if GatewayDeviceType.is_esp2_gateway(self.dev_type):
self._bus = RS485SerialInterfaceV2(self.serial_path, baud_rate=self.baud_rate, callback=self._callback_receive_message_from_serial_bus)
else:
Expand Down

0 comments on commit 53f993f

Please sign in to comment.