Add contents to connection_info handler in cloud client (#95059)

This commit is contained in:
Joakim Sørensen 2023-06-27 17:45:41 +02:00 committed by GitHub
parent cd26de73b4
commit db01aecb02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 2 deletions

View file

@ -17,6 +17,7 @@ from homeassistant.components.alexa import (
smart_home as alexa_smart_home,
)
from homeassistant.components.google_assistant import smart_home as ga
from homeassistant.const import __version__ as HA_VERSION
from homeassistant.core import Context, HassJob, HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_call_later
@ -216,7 +217,14 @@ class CloudClient(Interface):
self, payload: dict[str, Any]
) -> dict[str, Any]:
"""Process cloud connection info message to client."""
return {}
return {
"remote": {
"connected": self.cloud.remote.is_connected,
"enabled": self._prefs.remote_enabled,
"instance_domain": self.cloud.remote.instance_domain,
},
"version": HA_VERSION,
}
async def async_alexa_message(self, payload: dict[Any, Any]) -> dict[Any, Any]:
"""Process cloud alexa message to client."""