From f366dd9e155a87979d1374d73091b6045b9b891d Mon Sep 17 00:00:00 2001 From: MapoDan <42698485+MapoDan@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:20:58 +0100 Subject: [PATCH] Update sensor.py --- custom_components/file_restore/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/file_restore/sensor.py b/custom_components/file_restore/sensor.py index de473ea..c96bc01 100644 --- a/custom_components/file_restore/sensor.py +++ b/custom_components/file_restore/sensor.py @@ -47,7 +47,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the file sensor.""" _LOGGER.debug("Setup entity coming from configuration.yaml named: %s", config.get(CONF_NAME)) - await async_setup_reload_service(hass, DOMAIN, [PLATFORM]) + await async_setup_reload_service(hass, DOMAIN, PLATFORM) async_add_entities([FileSensor(config)], True) async def async_setup_entry(hass, config_entry, async_add_devices): @@ -58,7 +58,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices): else: result = config_entry.data _LOGGER.debug("setup entity-config_entry_data=%s",result) - await async_setup_reload_service(hass, DOMAIN, [PLATFORM]) + await async_setup_reload_service(hass, DOMAIN, PLATFORM) async_add_devices([FileSensor(result)], True) class FileSensor(Entity):