Correct expose_by_default interaction with expose_domains (#17745)

Based on the documentation here: https://www.home-assistant.io/components/google_assistant/#expose_by_default it seems that expose_by_default means all devices should be exposed unless explicitly set to false, and that regardless if this is set domains in exposed_domains should be exposed.
This commit is contained in:
Glen Takahashi 2018-11-06 06:53:47 -05:00 committed by Paulus Schoutsen
parent 2c36b9db1f
commit 34d7758b4a

View file

@ -46,7 +46,7 @@ def async_register_http(hass, cfg):
entity_config.get(entity.entity_id, {}).get(CONF_EXPOSE)
domain_exposed_by_default = \
expose_by_default and entity.domain in exposed_domains
expose_by_default or entity.domain in exposed_domains
# Expose an entity if the entity's domain is exposed by default and
# the configuration doesn't explicitly exclude it from being