Hi,
I am looking to extend (play around with) an existing core light component. From this best practices on creating a custom component thread I see that one of the solutions is:
- copy existing component to custom_components directory.
- rename components directory to a new name (e.g. fancy_light)
- in init.py change: DOMAIN = “fancy_light”
- in manifest.json change: “domain”: “fancy_light” and “name”: “Fancy Light”
- validate configuration and restart HA
- define new component in configuration.yaml (related thread):
-
- fancy_light:
- revalidate configuration and restart HA
Initially I want to do as minimal changes as possible and to have a new component behaving exactly like the core light component.
My configuration for this custom component:
Problem I get:
- Configuration validations gives a warning: Integration error: fancy_light - Integration ‘fancy_light’ not found.
- service fancy_light.toggle is not available in developer tools too.
What am I missing? I am using correct custom_components directory as other components are loaded and working from there.
Also, what would be the best way to redefine my existing light device to be not a base light device but a fancy light ?
P.s. I see that renaming might not be necessary, as custom component should override core component. But I am still not able to see my extended light component changed (I tried to have exact copy of light component in custom_components/light with changed strings.json to see the changes in UI).
Do I need somehow provide a configuration for extended light component in configuration.yaml?