Newbye syntax problem in automations.yaml

Hi.
I am very new to Home Assistant, and coming from Domoticz.
I try to reproduce the heating system I had before, and I’ve build a SQL database in MariaDB to describe the temperature I want at various moments of the day.

So I have a SQL sensor (called here tempvanne) that gives every 5 minutes the temperature I’ve chosen. Everytime the value changes, the zwave entity need to be updated.
This is the content of my automations.yaml file (NB : in the example,

  • alias: Automatisme
    trigger:
    platform: numeric_state
    entity_id: sensor.tempvanne
    attribute: temperature
    action:
    • service: climate.set_temperature
      data:
      entity_id: climate.danfoss_z_thermostat_014g0013_heating_1
      temperature: 21

The last line use a simple value for testing purpose.
When I restart HA, this is the error message I got :

Invalid config for [automation]: must contain at least one of below, above… Got OrderedDict([(‘homeassistant’, OrderedDict([(‘legacy_templates’, True), (‘auth_providers’, [OrderedDict([(‘type’, ‘homeassistant’)]), OrderedDict([(‘type’, ‘trusted_networks’)…

Thanks for help

Please use the code formatter of this editor for yaml and other source files.

Next, the message is about a malformed trigger. As printed in the documentation, numeric_state requires above and below fields to be defined.

1 Like

above OR below :slight_smile:

Hi.
Thanks for your help; I’ve change the event type to ‘state’ and I have no more error message.
Regards

1 Like