#Message malformed in automation

1 messages · Page 1 of 1 (latest)

azure tusk
#

👋 I’m confused by this error since I’m trying to use a template:

Message malformed: Invalid trigger 'numeric_state - platform' specified

alias: MB Fan auto-on
description: ""
triggers:
  - trigger: template
      value_template: "{{ states('sensor.mb_humidity_sensor_humidity') > states('sensor.kitchen_humidity_sensor_humidity') + 5 }}"
      for:
        hours: 0
        minutes: 0
        seconds: 1
conditions: []
actions:
  - type: turn_on
    device_id: 365a366ac376480aeec16c8386fda897
    entity_id: 8402ab6d344387943f6d670bacbf7daa
    domain: light
mode: single
#

😬 oops it was just too much indentation under trigger!

fluid fractal
#

Your indentation is wrong.

#

There you go! Glad you figured it out 🙂

#

FYI, it's much better to target entities with your actions than devices.
That way if say your lightbulb needs replacing (or you want to get one that does more things), you can just name the new one the same as the old one and all your automations will keep working 🙂