Skip to content

Commit

Permalink
feat: device association tracking (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
petretiandrea authored Nov 3, 2023
1 parent 64aaed0 commit 25ecf3e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions custom_components/tapo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 25ecf3e

Please sign in to comment.