mirror of
https://github.com/home-assistant/core
synced 2024-09-15 17:29:45 +02:00
Reinstate passing loop to DSMR (#24127)
* Reinstate passing loop * Also pass loop into other part
This commit is contained in:
parent
bebfc3d16e
commit
4b256f3466
@ -183,11 +183,12 @@ async def async_setup_platform(hass, config, async_add_entities,
|
||||
if CONF_HOST in config:
|
||||
reader_factory = partial(
|
||||
create_tcp_dsmr_reader, config[CONF_HOST], config[CONF_PORT],
|
||||
config[CONF_DSMR_VERSION], update_entities_telegram)
|
||||
config[CONF_DSMR_VERSION], update_entities_telegram,
|
||||
loop=hass.loop)
|
||||
else:
|
||||
reader_factory = partial(
|
||||
create_dsmr_reader, config[CONF_PORT], config[CONF_DSMR_VERSION],
|
||||
update_entities_telegram)
|
||||
update_entities_telegram, loop=hass.loop)
|
||||
|
||||
async def connect_and_reconnect():
|
||||
"""Connect to DSMR and keep reconnecting until Home Assistant stops."""
|
||||
|
Loading…
Reference in New Issue
Block a user