mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Fix smartthings cloud webhook (#29219)
* Fix smartthings cloud webhook * Update smartapp.py
This commit is contained in:
parent
392cdf49e6
commit
4065c46046
@ -234,7 +234,7 @@ async def setup_smartapp_endpoint(hass: HomeAssistantType):
|
||||
and not hass.config_entries.async_entries(DOMAIN)
|
||||
):
|
||||
cloudhook_url = await hass.components.cloud.async_create_cloudhook(
|
||||
hass, config[CONF_WEBHOOK_ID]
|
||||
config[CONF_WEBHOOK_ID]
|
||||
)
|
||||
config[CONF_CLOUDHOOK_URL] = cloudhook_url
|
||||
await store.async_save(config)
|
||||
@ -287,7 +287,7 @@ async def unload_smartapp_endpoint(hass: HomeAssistantType):
|
||||
and hass.components.cloud.async_is_logged_in()
|
||||
):
|
||||
await hass.components.cloud.async_delete_cloudhook(
|
||||
hass, hass.data[DOMAIN][CONF_WEBHOOK_ID]
|
||||
hass.data[DOMAIN][CONF_WEBHOOK_ID]
|
||||
)
|
||||
# Remove cloudhook from storage
|
||||
store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user