core: Invalid config for [automation]: invalid trigger configuration in 2022.10.0b5

The problem

I am getting ‘Invalid config for [automation]: invalid trigger configuration’ error in the notification center after upgrading to 2022.10.0b5. I haven’t changed anything in my automations and they were working fine on 2022.9.

What version of Home Assistant Core has the issue?

core-2022.10.0b5

What was the last working version of Home Assistant Core?

core-2022.9.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config
Source: components/device_automation/trigger.py:69
First occurred: 9:44:38 AM (6 occurrences)
Last logged: 10:08:56 AM

Invalid config for [automation]: invalid trigger configuration (See /config/configuration.yaml, line 29).
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_automation/trigger.py", line 66, in async_validate_trigger_config
    return cast(ConfigType, platform.TRIGGER_SCHEMA(config))
  File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 433, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected a dictionary for dictionary value @ data['variables']

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 113, in _try_async_validate_config_item
    validated_config = await async_validate_config_item(hass, config, full_config)
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 80, in async_validate_config_item
    config[CONF_TRIGGER] = await async_validate_trigger_config(
  File "/usr/src/homeassistant/homeassistant/helpers/trigger.py", line 100, 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 69, in async_validate_trigger_config
    raise InvalidDeviceAutomationConfig("invalid trigger configuration") from err
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: invalid trigger configuration

Additional information

I am not able to find out which automation is exactly causing the error. I looked into all my automations and only one automation has a ‘variable’ configured under trigger.

trigger:
  - platform: device
    device_id: 7044df21f1044c9cbcd938542ce7e6b3
    domain: lock
    entity_id: lock.front_door
    type: unlocked
    variables:
      unlock_time: '{{ now().time().strftime("%H:%M") }}'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Having exactly same issue after upgrade to 2022.10

Logger: homeassistant.config
Source: components/device_automation/trigger.py:69
First occurred: 8:51:51 AM (2 occurrences)
Last logged: 8:51:51 AM

Invalid config for [automation]: invalid trigger configuration (See /config/configuration.yaml, line 113).
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_automation/trigger.py", line 66, in async_validate_trigger_config
    return cast(ConfigType, platform.TRIGGER_SCHEMA(config))
  File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 433, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected a dictionary for dictionary value @ data['variables']

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 113, in _try_async_validate_config_item
    validated_config = await async_validate_config_item(hass, config, full_config)
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 80, in async_validate_config_item
    config[CONF_TRIGGER] = await async_validate_trigger_config(
  File "/usr/src/homeassistant/homeassistant/helpers/trigger.py", line 100, 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 69, in async_validate_trigger_config
    raise InvalidDeviceAutomationConfig("invalid trigger configuration") from err
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: invalid trigger configuration

Leaving aside the fact that I have the same problem, has anyone opened an issue asking for the automation YAML file & line number to be added in the log error message?