I am running Home Assistant 2023.2.1 provisioned in a docker instance running on an Unraid server.
I am attempting to follow the instructions described at “Integration Services”.
It looks very simple, yet I have failed and I am unable to determine any way to establish what has gone wrong.
I created the file custom_components/hello_service/__init__.py
. In the interest of completeness, this is the file as I have it.
DOMAIN = "hello_service"
ATTR_NAME = "name"
DEFAULT_NAME = "World"
def setup(hass, config):
"""Set up is called when Home Assistant is loading our component."""
def handle_hello(call):
"""Handle the service call."""
name = call.data.get(ATTR_NAME, DEFAULT_NAME)
hass.states.set("hello_service.hello", name)
hass.services.register(DOMAIN, "hello", handle_hello)
# Return boolean to indicate that initialization was successful.
return True
I also created custom_components/hello_service/manifest.json
{
"domain": "hello_service",
"name": "Hello Service",
"documentation": "https://developers.home-assistant.io/docs/dev_101_services",
"iot_class": "local_push",
"version": "0.1.0"
}
Lastly, I modified my configuration.yaml
so that it looks like this. Note the last line which is new. If I remove the hello_service:
line, then the configuration is accepted by the check system.
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
hello_service:
Now, when I then visit “Developer Tools” and select “CHECK CONFIGURATION”, I receive the following output.
Integration error: hello_service - Integration 'hello_service' not found.
Sadly, home-assistant.log
offers no new information.
What have I missed?