Skip to content

Commit

Permalink
Fix #561: Unexpected error fetching Tapo resource status data
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajNyiri committed Jul 4, 2024
1 parent ded054c commit 0cc12a6
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 @@ -1236,7 +1236,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 0cc12a6

Please sign in to comment.