Hi.
So I’m trying to create a custom integration and I decided to start off with the “hello_state” example from https://developers.home-assistant.io/docs/creating_component_index.
I created a “hello_state” directory in the custom_components
folder, then a init script inside of it. I copied the non-async code from the docs into it. Then I restarted Home Assistant and added hello_state:
to my configuration.yaml
. After that, I tried restarting again, but Home Assistant keeps saying Integration error: hello_state - Integration 'hello_state' not found
.
Am I missing something? The docs don’t seem to mention any extra steps so I’m not sure why this basic example is not working.
1 Like
Directory should be inside custom_components folder, double check its place
Whoops. I forgot to mention that. It is in the custom_components
folder. I edited the post.
custom_components/
├── hacs
│ ├── ...
├── hello_state
│ └── __init__.py
└── pyscript
├── ...
What other files you have inside that folder?
There is a json file which is a must
with version information
1 Like
You mean manifest.json
?
Well I gave it a try.
I created it in the hello_state
directory.
{
"domain": "hello_state",
"name": "hello_state",
"documentation": "https://www.example.com",
"dependencies": [],
"version": "1.0.0",
"codeowners": [],
"requirements": [],
"iot_class": "cloud_polling"
}
I works now. Interesting. I did create this file before but it didn’t work. Maybe because I forgot to add version
.
Thanks!
1 Like
Yes, without version, you can not have it. On the other hand, you should see error logs about missing version information.