Skip to content

Commit

Permalink
Fix JurajNyiri#561: Unexpected error fetching Tapo resource status data
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajNyiri authored and marcosngomezi committed Jul 20, 2024
1 parent e455b29 commit f708e0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/tapo_control/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,10 @@ async def setupEvents(hass, config_entry):
"Webhook enabled: " + str(config_entry.data.get(ENABLE_WEBHOOKS) is True)
)
LOGGER.debug("Using Webhooks: " + str(shouldUseWebhooks))
if not hass.data[DOMAIN][config_entry.entry_id]["events"].started:
if (
hass.data[DOMAIN][config_entry.entry_id]["events"] is not False
and not hass.data[DOMAIN][config_entry.entry_id]["events"].started
):
LOGGER.debug("Setting up events...")
events = hass.data[DOMAIN][config_entry.entry_id]["events"]
onvif_capabilities = await hass.data[DOMAIN][config_entry.entry_id][
Expand Down

0 comments on commit f708e0a

Please sign in to comment.