Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95925

Automation with 'or' condition - what is correct syntax?

$
0
0

@kol wrote:

Well, I do not see any difference with any sample I can find in inet… Could you please take a look and advice what is wrong? it says: “Invalid config for [automation]: not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None
required key not provided @ data[‘trigger’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 158).”

I need to send a msg if state of any sensor changed

- alias: 'value increment'
  trigger:
    platform: state
  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: sensor.a
      - condition: state
        entity_id: sensor.b
      - condition: state
        entity_id: sensor.c
  action:
  - service: telegram_bot.send_message
    data_template:
      disable_notification: False
      target: 800000008
      title: "Change alert"
      message: >
        Value A: {{ states('sensor.a') }};
        Value B: {{ states('sensor.b') }};
        Value C: {{ states('sensor.c') }}

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95925

Trending Articles