Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error on entity_config missing #11561

Merged
merged 1 commit into from
Jan 10, 2018

Conversation

philk
Copy link
Contributor

@philk philk commented Jan 10, 2018

If the google_assistant key exists in the config but has no entity_config key under it you'll get an error.

  File "/Users/pkates/src/home-assistant/homeassistant/components/google_assistant/http.py", line 51, in is_exposed
    entity_config.get(entity.entity_id, {}).get(CONF_EXPOSE)
AttributeError: 'NoneType' object has no attribute 'get'

@balloob related to #11499

Checklist:

  • The code change is tested and works locally.

If the `google_assistant` key exists in the config but has no
`entity_config` key under it you'll get an error.

```
  File "/Users/pkates/src/home-assistant/homeassistant/components/google_assistant/http.py", line 51, in is_exposed
    entity_config.get(entity.entity_id, {}).get(CONF_EXPOSE)
AttributeError: 'NoneType' object has no attribute 'get'
```
@balloob
Copy link
Member

balloob commented Jan 10, 2018

oops and thanks

@balloob
Copy link
Member

balloob commented Jan 10, 2018

I had the same logic here but that didn't take the is_exposed method into consideration.

@philk philk deleted the google_assistant_minor_fix branch January 10, 2018 04:00
@balloob balloob mentioned this pull request Jan 11, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants