Hi guys,
I’m running 2021.12.7 in a Docker image on a Qnap. It has only been up for a little over a week, and I’m still climbing a steep learning curve.
I’ll offer a little more background than I usually would for this error, because I’m not sure which bit of it may be relevant…
I’ve added a new Shelly Uni to my Garage door control unit to read the state of a spare button on the existing RF door remote, and give me a HA means of triggering the door. (I’ll probably use the other Uni output to drive a piezzo for audio feedback in the garage - but that is for a later project.) The hardware install is all ok and seems to be working. I’ve been playing with an automation to use data from the spare door remote signal, to switch on the flood lights that illuminate the drive way up to the garage. It all seemed to be going well, with everything doing as I expected it should after a couple of tweaks.
Then I noticed that TTS announcements were not happening. I use a helper variable to track the state of TTS outputs, so one does not get triggered until the previous one has completed and cleared. Sometimes, something goes wrong and the variable doesn’t get reset when a TTS announcement is finished, at which point no other announcement will start.
So I built a simple little automation to trigger if the helper boolean stayed in the “on” state for more that 5 minutes, and if so to run a script that would reset the helper variable, and stop the script that manages TTS message output.
alias: tts watchdog
description: ''
mode: single
trigger:
- platform: state
entity_id: input_boolean.speaking
to: 'on'
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- service: script.reset_announcements
alias: reset announcements
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.speaking
- service: script.turn_off
target:
entity_id: script.speak
mode: single
icon: mdi:alarm-light
I saved this automation, but it did not appear in the list. So I created it again. Again it did not appear in the list. Both times I had called it “tts watchdog” - and wondered if I may have stumbled upon a reserved name or some such thing. So I created it a third time under a completely different name, and again it did not appear in the list of Automations.
Thinking there was “something weird” going on, I attempted a restart - and got an error indicating an invalid configuration. So I fired up the Text Editor in the Qnap and opened the automations.yaml at which point I found all three of the attempts at the automation above were saved in the file under different ID numbers. So I manually deleted all three from the yaml and saved it thinking I had solved the problem.
Alas, I am still getting an error when attempting to restart, and the log file is pointing to a whole lot of python that is beyond my current skill set…
Logger: homeassistant.helpers.check_config
Source: components/shelly/utils.py:174
First occurred: 4:15:17 PM (8 occurrences)
Last logged: 5:34:52 PM
Unexpected error validating config
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 161, in async_check_ha_config_file
await config_validator.async_validate_config( # type: ignore
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 129, in async_validate_config
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 106, in _try_async_validate_config_item
config = await async_validate_config_item(hass, config, full_config)
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 74, in async_validate_config_item
config[CONF_TRIGGER] = await async_validate_trigger_config(
File "/usr/src/homeassistant/homeassistant/helpers/trigger.py", line 50, in async_validate_trigger_config
conf = await platform.async_validate_trigger_config(hass, conf)
File "/usr/src/homeassistant/homeassistant/components/device_automation/trigger.py", line 26, in async_validate_trigger_config
return await getattr(platform, "async_validate_trigger_config")(hass, config)
File "/usr/src/homeassistant/homeassistant/components/shelly/device_trigger.py", line 100, in async_validate_trigger_config
input_triggers = get_block_input_triggers(block_wrapper.device, block)
File "/usr/src/homeassistant/homeassistant/components/shelly/utils.py", line 174, in get_block_input_triggers
if not is_block_momentary_input(device.settings, block):
File "/usr/local/lib/python3.9/site-packages/aioshelly/block_device.py", line 272, in settings
raise AuthRequired
aioshelly.exceptions.AuthRequired
Logger: homeassistant.components.homeassistant
Source: components/homeassistant/__init__.py:160
Integration: Home Assistant Core Integration (documentation, issues)
First occurred: 4:15:17 PM (4 occurrences)
Last logged: 5:34:52 PM
The system cannot restart because the configuration is not valid: Unexpected error calling config validator:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/homeassistant/__init__.py:170
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 4:15:17 PM (4 occurrences)
Last logged: 5:34:52 PM
[140050818282544] The system cannot restart because the configuration is not valid: Unexpected error calling config validator:
[140050812944736] The system cannot restart because the configuration is not valid: Unexpected error calling config validator:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 733, in admin_handler
await result
File "/usr/src/homeassistant/homeassistant/components/homeassistant/__init__.py", line 170, in async_handle_core_service
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Unexpected error calling config validator:
Please, can someone tell me what is going on, and more importantly, how to fix it?