Remove cloud dependency from mobile_app (#29373)
This commit is contained in:
1 parent
98b6905738
commit
e26eebfc19
4 files changed
+21
-29
No files matched your search
@@ -4,7 +4,6 @@ import logging
|
||||
from aiohttp.web import HTTPBadRequest, Request, Response
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.cloud import CloudNotAvailable, async_remote_ui_url
|
||||
from homeassistant.components.frontend import MANIFEST_JSON
|
||||
from homeassistant.components.zone.const import DOMAIN as ZONE_DOMAIN
|
||||
from homeassistant.const import (
|
||||
@@ -310,9 +309,10 @@ async def handle_webhook(
|
||||
if CONF_CLOUDHOOK_URL in registration:
|
||||
resp[CONF_CLOUDHOOK_URL] = registration[CONF_CLOUDHOOK_URL]
|
||||
|
||||
try:
|
||||
resp[CONF_REMOTE_UI_URL] = async_remote_ui_url(hass)
|
||||
except CloudNotAvailable:
|
||||
pass
|
||||
if "cloud" in hass.config.components:
|
||||
try:
|
||||
resp[CONF_REMOTE_UI_URL] = hass.components.cloud.async_remote_ui_url()
|
||||
except hass.components.cloud.CloudNotAvailable:
|
||||
pass
|
||||
|
||||
return webhook_response(resp, registration=registration, headers=headers)
|
||||
Reference in new issue
Block a user