Mobile App: Expose Cloud Remote UI FQDN in registration response (#22055)
* Add a callback to get the cloud remote UI FQDN * Expose Cloud Remote UI FQDN in the registration response * Return a URL instead of FQDN
This commit is contained in:
1 parent
89c96279ce
commit
5a9e8b2d3e
3 files changed
+23
-2
No files matched your search
@@ -118,6 +118,16 @@ async def async_delete_cloudhook(hass, webhook_id: str) -> None:
|
||||
await hass.data[DOMAIN].cloudhooks.async_delete(webhook_id)
|
||||
|
||||
|
||||
@bind_hass
|
||||
@callback
|
||||
def async_remote_ui_url(hass) -> str:
|
||||
"""Get the remote UI URL."""
|
||||
if not async_is_logged_in(hass):
|
||||
raise CloudNotAvailable
|
||||
|
||||
return "https://" + hass.data[DOMAIN].remote.instance_domain
|
||||
|
||||
|
||||
def is_cloudhook_request(request):
|
||||
"""Test if a request came from a cloudhook.
|
||||
|
||||
|
||||
Reference in new issue
Block a user