From 25ecf3eeebe1fad108b5cf8854114deb6f1f8c11 Mon Sep 17 00:00:00 2001 From: petretiandrea Date: Fri, 3 Nov 2023 18:05:13 +0100 Subject: [PATCH] feat: device association tracking (#598) --- custom_components/tapo/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/custom_components/tapo/__init__.py b/custom_components/tapo/__init__.py index a5d73b9..9b7ea5a 100755 --- a/custom_components/tapo/__init__.py +++ b/custom_components/tapo/__init__.py @@ -12,7 +12,6 @@ from custom_components.tapo.setup_helpers import setup_tapo_api from custom_components.tapo.tapo_device import TapoDevice from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_SCAN_INTERVAL from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from plugp100.api.hub.hub_device import HubDevice @@ -41,12 +40,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): (await api.get_device_info()).map(lambda x: DeviceInfo(**x)).get_or_raise() ) if get_short_model(state.model) in SUPPORTED_HUB_DEVICE_MODEL: - scan_interval_millis = entry.data.get(CONF_SCAN_INTERVAL) * 1000 hub = TapoHub( entry, - HubDevice( - api, subscription_polling_interval_millis=scan_interval_millis - ), + HubDevice(api, subscription_polling_interval_millis=30_000), ) return await hub.initialize_hub(hass) else: