Hassio Automation

I am going nuts with automations in hassio. Here is an automation I am trying.

  • id: Alarm Triggered
    alias: test if notify works
    trigger:
    • platform: state
      entity_id: binary_sensor.neo_coolcam_doorwindow_detector_sensor_2
      to: “on”
      condition: or
      conditions:
    • condition: state
      entity_id: alarm_control_panel.alarm_control_panel
      state: armed_home
      action:
      • data:
        service: notify_budlyte
        message: your home and alarm triggered
    • condition: state
      entity_id: alarm_control_panel.alarm_control_panel
      state: armed_away
      action:
      • data:
        service: notify_budlyte
        message: your home and alarm triggered

The check configuration keep telling me the automation is invalid. I get the following set of messages.

Failed config
automation:
- alias: test if notify works
condition: or
conditions: [source /config/automations.yaml:8]
- action: [source /config/automations.yaml:12]
- data: [source /config/automations.yaml:13]
service: notify_budlyte
message: your home and alarm triggered
condition: state
entity_id: alarm_control_panel.alarm_control_panel
state: armed_home
- action: [source /config/automations.yaml:19]
- data: [source /config/automations.yaml:20]
service: notify_budlyte
message: your home and alarm triggered
condition: state
entity_id: alarm_control_panel.alarm_control_panel
state: armed_away
id: Alarm Triggered
trigger: [source /config/automations.yaml:3]
- platform: state
entity_id: binary_sensor.neo_coolcam_doorwindow_detector_sensor_2
to: on

Successful config (partial)
automation:

I suspect it is trying to help me figure out what is wrong but I am lost. Can anyone help me.

Thanks

The first step would be to check the yaml file for spacing etc. but this is difficult to do without using code blocks. See the blue box at the top of your message. The spacing tends to be 2 space characters without any tabs.

I alway past my code int Yaml Lint to make sure it is formatted correctly before trying it. He it is better formatted. Thanks

- id: Alarm Triggered
  alias: test if notify works
  trigger:
    - platform: state
      entity_id: binary_sensor.neo_coolcam_doorwindow_detector_sensor_2
      to: "on"
  condition: or
  conditions:
    - condition: state
      entity_id: alarm_control_panel.alarm_control_panel
      state: armed_home
      action:
        - data:
          service: notify_budlyte
          message: your home and alarm triggered
    - condition: state
      entity_id: alarm_control_panel.alarm_control_panel
      state: armed_away
      action:
        - data:
            service: notify_budlyte
          message: your home and alarm triggered

My service calls are done like this…

 - service: notify.mypushbullet

Thanks - I did catch that but still getting error in my automation. I have changed it to just try the “or” condition to make duck simple. Still can’t get a clean config test. Here is my new code. I am about to dump HA and look elsewhere. Is it me or are the diagnostics that bad and of no help. Seems you need to just to hours of testing to get anything done. I always test my code in Yamal Lint to make sure it is structured correctly before testing in HA. Am I the only frustrated one? Any help would be greatly appreciated.

- id: alarm triggered
  alias: test if notify works
  trigger:
    - platform: state
      entity_id: binary_sensor.neo_coolcam_doorwindow_detector_sensor_2
      from: "off"
      to: "on"
  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: alarm_control_panel.alarm_control_panel
        state: armed_away
      - conditon: state
        entity_id: alarm_control_panel.alarm_control_panel
        state: armed_home

Failed config
automation:
- alias: test if notify works
condition: [source /config/automations.yaml:8]
condition: or
conditions: [source /config/automations.yaml:10]
- condition: state
entity_id: alarm_control_panel.alarm_control_panel
state: armed_away
- conditon: state
entity_id: alarm_control_panel.alarm_control_panel
state: armed_home
id: alarm triggered
trigger: [source /config/automations.yaml:3]
- platform: state
entity_id: binary_sensor.neo_coolcam_doorwindow_detector_sensor_2
from: off
to: on

Successful config (partial)
automation:

Your state: armed_home/away should be in single quotes. See if that helps. Checking with Lint just checks the structure not that the code is correct, for instance alarm_control_panel.alarm_control_panel could be alarm_control_panel.house?

Thanks for the reply. Tried that and got same results. Did notice this in the log.

2018-03-10 11:28:49 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [conditon] is an invalid option for [automation]. Check: automation->condition->0->conditions->1->conditon. (See /config/configuration.yaml, line 84). Please check the docs at https://home-assistant.io/components/automation/

I followed that doc but am beginning to think HASSIO may be the problem. May be Or and AND are not working in HASSIO. Below is right out of the doc’s. Only other thing I can think of is there is something wrong with the trigger portion of the automation. Thanks again.

condition:
  condition: and
  conditions:
    - condition: state
      entity_id: 'device_tracker.paulus'
      state: 'home'
    - condition: numeric_state
      entity_id: 'sensor.temperature'
      below: '20'

I don’t think your entity_id’s should be in quotes.