Cloud conf (#18216)
* Add original config to entityfilter * Add alexa/google config to cloud status call * Lint
This commit is contained in:
1 parent
8de79ed57c
commit
bf54582d76
5 files changed
+74
-20
No files matched your search
@@ -122,7 +122,7 @@ class Cloud:
|
||||
self.hass = hass
|
||||
self.mode = mode
|
||||
self.alexa_config = alexa
|
||||
self._google_actions = google_actions
|
||||
self.google_actions_user_conf = google_actions
|
||||
self._gactions_config = None
|
||||
self._prefs = None
|
||||
self.id_token = None
|
||||
@@ -180,7 +180,7 @@ class Cloud:
|
||||
def gactions_config(self):
|
||||
"""Return the Google Assistant config."""
|
||||
if self._gactions_config is None:
|
||||
conf = self._google_actions
|
||||
conf = self.google_actions_user_conf
|
||||
|
||||
def should_expose(entity):
|
||||
"""If an entity should be exposed."""
|
||||
|
||||
@@ -11,6 +11,8 @@ from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.components.http.data_validator import (
|
||||
RequestDataValidator)
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.components.alexa import smart_home as alexa_sh
|
||||
from homeassistant.components.google_assistant import smart_home as google_sh
|
||||
|
||||
from . import auth_api
|
||||
from .const import DOMAIN, REQUEST_TIMEOUT
|
||||
@@ -307,5 +309,9 @@ def _account_data(cloud):
|
||||
'email': claims['email'],
|
||||
'cloud': cloud.iot.state,
|
||||
'google_enabled': cloud.google_enabled,
|
||||
'google_entities': cloud.google_actions_user_conf['filter'].config,
|
||||
'google_domains': list(google_sh.DOMAIN_TO_GOOGLE_TYPES),
|
||||
'alexa_enabled': cloud.alexa_enabled,
|
||||
'alexa_entities': cloud.alexa_config.should_expose.config,
|
||||
'alexa_domains': list(alexa_sh.ENTITY_ADAPTERS),
|
||||
}
|
||||
Reference in new issue
Block a user