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 4b49f77 commit 93d776b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions custom_components/eltako/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from homeassistant.core import HomeAssistant
from homeassistant.const import CONF_MAC
from homeassistant.helpers.dispatcher import async_dispatcher_connect, dispatcher_send, dispatcher_connect
from homeassistant.helpers.dispatcher import async_dispatcher_connect, dispatcher_send
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.device_registry import DeviceRegistry, DeviceInfo
from homeassistant.config_entries import ConfigEntry
Expand Down Expand Up @@ -145,10 +145,6 @@ def _register_device(self) -> None:
name= self.dev_name,
model=self.model,
)

# Register callbacks.
event_id = config_helpers.get_bus_event_type(self.gateway.base_id, SIGNAL_RECEIVE_MESSAGE)
dispatcher_connect(self.hass, event_id, self.process_messages)


### address validation functions
Expand Down Expand Up @@ -214,6 +210,9 @@ async def async_setup(self):
self.hass, event_id, self._callback_send_message_to_serial_bus
)

event_id = config_helpers.get_bus_event_type(self.gateway.base_id, SIGNAL_RECEIVE_MESSAGE)
async_dispatcher_connect(self.hass, event_id, self.process_messages)

# Register home assistant service for sending arbitrary telegrams.
#
# The service will be registered for each gateway, as the user
Expand Down

0 comments on commit 93d776b

Please sign in to comment.