mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00: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:
|
if CONF_HOST in config:
|
||||||
reader_factory = partial(
|
reader_factory = partial(
|
||||||
create_tcp_dsmr_reader, config[CONF_HOST], config[CONF_PORT],
|
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:
|
else:
|
||||||
reader_factory = partial(
|
reader_factory = partial(
|
||||||
create_dsmr_reader, config[CONF_PORT], config[CONF_DSMR_VERSION],
|
create_dsmr_reader, config[CONF_PORT], config[CONF_DSMR_VERSION],
|
||||||
update_entities_telegram)
|
update_entities_telegram, loop=hass.loop)
|
||||||
|
|
||||||
async def connect_and_reconnect():
|
async def connect_and_reconnect():
|
||||||
"""Connect to DSMR and keep reconnecting until Home Assistant stops."""
|
"""Connect to DSMR and keep reconnecting until Home Assistant stops."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user