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

Disable partial custom component overlays #141

Closed
balloob opened this Issue Feb 7, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@balloob
Copy link
Member

balloob commented Feb 7, 2019

We currently have the following loading order for any platform or component:

  • custom_components/hue/light.py
  • homeassistant/components/hue/light.py

This means that a user can create a partial custom component, where they only override a single platform of Home Assistant, but not the others. For example, Hue could be composed of:

  • homeassistant/components/hue/__init__.py
  • homeassistant/components/hue/config_flow.py
  • homeassistant/components/hue/bridge.py
  • custom_components/hue/light.py

This can cause the issue that the built-in component or platform evolves and now no longer offers the data structures or functions that the custom platform expects to be there.

I propose that when we load a platform, we first resolve the component and then load all platforms from the same source. This means that a custom component will now replace a built-in component instead of blend in with it.

@pvizeli

This comment has been minimized.

Copy link
Member

pvizeli commented Feb 7, 2019

Make absolutely sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.