Automation error log

I keep getting a notification that I have an error in one of my automations. The notification says to check the log, but the log isn’t much help. This is what I see in the log:

Logger: homeassistant.config
Source: config.py:464
First occurred: June 16, 2022, 3:20:03 PM (13 occurrences)
Last logged: 5:04:46 PM

Invalid config for [automation]: not a valid value for dictionary value @ data[‘type’]. Got None required key not provided @ data[‘entity_id’]. Got None required key not provided @ data[‘hvac_mode’]. Got None. (See /config/configuration.yaml, line 10).

Line 10 in my configuration file is:
group: !include groups.yaml
Obviously, that has noting to do with automations, although line 11 is the include line for automations.yaml

How do I track this down? My automations work so I don’t know what to make of this.

Correct. It’s unfortunate but the line number indicated in an error message rarely corresponds to the actual line containing the error. What you need to do is search for an automation (in automations.yaml) that references hvac_mode. It’s misconfigured.

Thanks for the reply.

I searched the automations.yaml file and I don’t use hvac_mode anywhere. I use hvac_action and climate_mode, but not hvac_mode.

In that case, search through configuration.yaml. If it’s not there, search through all other YAML files in the config folder. hvac_mode is part of the configuration of something that was used incorrectly in one of those files.

Tip:
Some text editors, like Visual Studio Code, allows you to search for a string in multiple files. It makes it easier to find something when you don’t know exactly which file contains it.

I did exactly that. The only hits in the configuration.yaml were from a couple of generic thermostats, and it was part of initial_hvac_mode: "off". The only other hits were in the log file itself.

I suspect the error message may be referring to a malformed Device Action.

Here’s the YAML for a Device Action meant to set a climate entity’s HVAC Mode:

device_id: abc123def456
domain: climate
entity_id: climate.whatever
type: set_hvac_mode
hvac_mode: heat

Note the presence of the three keys mentioned in the error message:

not a valid value for dictionary value @ data[‘type’]. Got None required key not provided @ data[‘entity_id’]. Got None required key not provided @ data[‘hvac_mode’].

A Device Action can be part of an automation or script.