I have the following yaml scripts for configuration.yaml and automation. If I go to Server Control, Check Configuration I get the error from the logs Invalid config for [automation]: required key not provided @ data [‘action’] Got None (See /config/configuration.yaml line 8) Line 8 = group: ! include groups.yaml.
If I put the value_template in Developer Tools, Template it returns the temperature difference in degrees C to 16 decimal places. What is wrong with the config or automation yaml to produce this error? The switch and ds18b20 temperatures are on a esp32 via esphome. The switch works manually, the switch and temperatures show in the dashboard.
configuration.yaml
sensor:
- platform: template
sensors:
temperature_difference:
entity_id:
- sensor.panel_temperature
- sensor.tank_temperature
friendly_name: "Temperature Difference"
value_template: "{{ (states('sensor.panel_temperature') | float - states('sensor.tank_temperature') | float ) }}"
automation
alias: pump_on
trigger:
platform: numeric_state
entity_id: sensor.temperature_diffenence
above: 4
action:
service: switch.turn_on
entity_id: switch.pump
alias: pump_off
trigger:
platform: numeric_state
entity_id: sensor.temperature_difference
below: 2
action:
service: switch.turn_off
entity_id: switch.pump