mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Fix mobile_app returning cloud URL when not subscribed (#83257)
fixes undefined
This commit is contained in:
parent
3044e78d43
commit
34fd64addf
@ -91,8 +91,9 @@ class RegistrationsView(HomeAssistantView):
|
|||||||
)
|
)
|
||||||
|
|
||||||
remote_ui_url = None
|
remote_ui_url = None
|
||||||
with suppress(hass.components.cloud.CloudNotAvailable):
|
if cloud.async_active_subscription(hass):
|
||||||
remote_ui_url = cloud.async_remote_ui_url(hass)
|
with suppress(hass.components.cloud.CloudNotAvailable):
|
||||||
|
remote_ui_url = cloud.async_remote_ui_url(hass)
|
||||||
|
|
||||||
return self.json(
|
return self.json(
|
||||||
{
|
{
|
||||||
|
@ -693,8 +693,9 @@ async def webhook_get_config(
|
|||||||
if CONF_CLOUDHOOK_URL in config_entry.data:
|
if CONF_CLOUDHOOK_URL in config_entry.data:
|
||||||
resp[CONF_CLOUDHOOK_URL] = config_entry.data[CONF_CLOUDHOOK_URL]
|
resp[CONF_CLOUDHOOK_URL] = config_entry.data[CONF_CLOUDHOOK_URL]
|
||||||
|
|
||||||
with suppress(hass.components.cloud.CloudNotAvailable):
|
if cloud.async_active_subscription(hass):
|
||||||
resp[CONF_REMOTE_UI_URL] = cloud.async_remote_ui_url(hass)
|
with suppress(hass.components.cloud.CloudNotAvailable):
|
||||||
|
resp[CONF_REMOTE_UI_URL] = cloud.async_remote_ui_url(hass)
|
||||||
|
|
||||||
webhook_id = config_entry.data[CONF_WEBHOOK_ID]
|
webhook_id = config_entry.data[CONF_WEBHOOK_ID]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user