Hello @gazoscalvertos, I’ve run into the same issue as @sparkydave with the automation erroring out. I’ve narrowed it down to the two blocks of code below. I’ve run them through several yaml checks and they come back as valid, I’ve even typed them in, but they still won’t pass HA’s validation. I could just comment them out and move on but since this is an ongoing project I thought we try to figure it out.
- id: alarm_arming_away
alias: '[Alarm] Away Mode Arming'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'pending'
action:
- service: notify.Telegram
data:
message: 'Arming Away Alarm'
- service: notify.andriod_Tablet
data:
message: 'Away alarm activated, make sure all doors and windows are closed'
- id: alarm_disarmed
alias: '[Alarm] Disarmed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'disarmed'
action:
- service: switch.turn_off
entity_id: switch.sirenstrobe_switch
- service: notify.Telegram
data:
message: 'Alarm disarmed'
- service: notify.andriod_Tablet
data:
message: 'The alarm has been deactivated '
I figured out my problem. originally I was missing “action:” in “alarm_ arming_away” when I typed it in, I noticed it when I posted the above and fix it here but did not go back to my yaml file and corrected it there. I have gone back and done so and now it passes the config check.
Thank you and the community for such a nice addition to HA.
There are a couple of things I can see that may be incorrect in the above, the 2nd - id: has 1 to many spaces and on both I think the trigger and action code blocks should be indented by 2 spaces?
- id: alarm_arming_away
alias: '[Alarm] Away Mode Arming'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'pending'
action:
- service: notify.Telegram
data:
message: 'Arming Away Alarm'
- service: notify.andriod_Tablet
data:
message: 'Away alarm activated, make sure all doors and windows are closed'
- id: alarm_disarmed
alias: '[Alarm] Disarmed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'disarmed'
action:
- service: switch.turn_off
entity_id: switch.sirenstrobe_switch
- service: notify.Telegram
data:
message: 'Alarm disarmed'
- service: notify.andriod_Tablet
data:
message: 'The alarm has been deactivated '
Nice catch, I’ve never noticed it before, fortunately, that how it’s all over and the notification work. Darn, now I have to find all instances of it everywhere I use it and correct it. However, it doesn’t resolve the problem.
here is the part of the original error, note that this is a small clip, it just repeats this for every item in automations.yaml
- action: [source /config/automations.yaml:7]
- data: [source /config/automations.yaml:9]
message: Away mode armed
service: notify.telegram
- data: [source /config/automations.yaml:12]
message: Away alarm activated
service: notify.android_tablet
alias: [Alarm] Away Mode Armed
id: alarm_armed_away
trigger: [source /config/automations.yaml:3]
- platform: state
entity_id: alarm_control_panel.house
to: armed_away
- action: [source /config/automations.yaml:23]
- data: [source /config/automations.yaml:25]
message: Home mode armed
service: notify.telegram
- data: [source /config/automations.yaml:28]
message: Home mode alarm activated, good night
service: notify.android_tablet
alias: [Alarm] Home Mode Armed
id: alarm_armed_home
trigger: [source /config/automations.yaml:19]
- platform: state
entity_id: alarm_control_panel.house
to: armed_home
As mentioned in my original post, after adding a missing “action:” (that I accidentally left off) and typing the lines into automations.yaml, the file now passes config check. I’ve seen this before where the copy and paste from another .ymal file causes a problem but when you type it in it works fine.
Heres a screenshot of the latest code, I will upload tonight.
Changes:
Perimeter Mode (Optional) - I use this to just arm the doors/windows during the day when I am in
Weather Icon/Summary (Optional) - You need Dark Sky for this to work
Let me know what you think and whether you have any improvements/suggestions.
I would say as far as the automations doc yes. Where I’m having a problem now is in getting the siren to go off. I verified that when I open a door it shows open on the panel as you can see on this screenshot
however, the siren doesn’ go off in either home or away mode. this is what my automations doc looks like
- id: alarm_armed_away
alias: '[Alarm] Away Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_away'
action:
- service: notify.telegram
data:
message: 'Away mode armed'
- service: notify.android_tablet
data:
message: 'Away alarm activated '
- id: alarm_armed_home
alias: '[Alarm] Home Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_home'
action:
- service: notify.telegram
data:
message: 'Home mode armed'
- service: notify.android_tablet
data:
message: 'Home mode alarm activated, good night '
- id: alarm_arming_away
alias: '[Alarm] Away Mode Arming'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'pending'
action:
- service: notify.telegram
data:
message: 'Away mode set'
- service: notify.android_tablet
data:
message: 'House alarm activating, ensure all doors and windows are closed'
- id: alarm_disarmed
alias: '[Alarm] Disarmed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'disarmed'
action:
- service: switch.turn_off
entity_id: switch.sirenstrobe_switch
- service: notify.telegram
data:
message: 'Alarm disarmed'
- service: notify.android_tablet
data:
message: 'The alarm has been deactivated '
- id: alarm_triggered
alias: '[Alarm] Triggered'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'triggered'
action:
- service: switch.turn_on
entity_id: switch.sirenstrobe_switch
- service: notify.telegram
data_template:
message: 'ALARM TRIGGERED!!! {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'
- service: notify.android_tablet
data:
message: 'ALARM TRIGGERED!!! {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'
- id: alarm_warning
alias: '[Alarm] Warning'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'warning'
action:
- service: notify.telegram
data_template:
message: 'ALARM Warning {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'
- service: notify.android_tablet
data:
message: 'Hello, the house alarm has been tripped. Please deactivate'
and this is my alarm doc looks like
platform: bwalarm
name: House
code: 12
pending_time: 60 #Grace time in seconds to allow for exit and entry using Away mode
trigger_time: 60
alarm: automation.alarm_triggered
warning: automation.alarm_warning
clock: True
#### COLOURS ########### Use any HTML format
warning_colour: 'orange'
pending_colour: 'orange'
disarmed_colour: '#03A9F4'
armed_home_colour: 'black'
armed_away_colour: 'black'
triggered_colour: 'red'
# Sensors in this group tigger the alarm immediately
immediate:
- sensor.arwdstatus
- sensor.awdstatus
- sensor.lrwd1status
- sensor.lrwd2status
- sensor.lrwd3status
- sensor.lrwd4status
- sensor.fdstatus
- sensor.ydstatus
- sensor.gdstatus
- binary_sensor.entrance_pir_sensor_motion
# Sensors in this group start the clock (pending_time) when tripped before the alarm is activated in 'Away' mode
delayed:
- binary_sensor.entrance_pir_sensor_motion
- binary_sensor.living_room_motion_sensor_sensor
# Same as notathome but hopefully the title is more self explanatory. Can still use notathome for backwards compatibility
# Note sensors can exist in more than one group notice top_floor appears in two groups
homemodeignore:
- binary_sensor.entrance_pir_sensor_motion
- binary_sensor.living_room_motion_sensor_sensor
# Use this group to automatically override the warning message on open sensors when setting 'away' mode. (I use this as I have a motion sensor at the front door)
override:
- binary_sensor.entrance_pir_sensor_motion
Not sure what I’m missing…
Update - I’m also getting the following in my log
2017-11-17 11:10:49 WARNING (SyncWorker_10) [custom_components.alarm_control_panel.bwalarm]
Could you try changing the following code (line 174) in your bwalarm.py:
new = event.data.get('new_state', None)
if new is None or new.state != STATE_ON:
new = event.data.get('new_state', None)
if new is None or new.state.lower() != STATE_ON:
Sorry but it’s a no go. It sees the sensors change but doesn’t activate the siren also the only time the amber box shows up is when the motion sensor show detected.
There are several sensors being used
Dome Door & Window sensor Z-wave
Monoproce Recessed Door sensor Z-wave
Visonic Door & Window Zigbee
GoControl / Linear Motion sensor
Ecolink Motion sensor
All of the sensor names you see in the screenshot are customized for better identification with regards to knowing where they are at and reading the status.
Update: To ensure I had your latest bwalrm.py I downloaded it again, seems as if I may have had an older one although I downloaded the original one 3 days ago.
Nevertheless, I can now see all of the sensors in “All Sensors”. In “Alway Mode”, the siren will now go off when the motion sensor is triggered, however opening a door doesn’t trigger the alarm although now it identifies it as an open sensor (by the way I made all of the statuses lower case to see if it help).
Here is something interesting in “Home Mode” on my computer using Chrome it only shows one open sensor, but on my phone running Chrome, it shows 2 sensors open, the door and motion sensor.?
The 1st pic is from my phone and the 2nd one from my computer
Update 2 - My phone’s browser is ver: 62.0.3202.84 and the PC was when I took the picture 61.0.3163.100 after upgrading it’s 62.0.3202.94, now whenever I open the door the sensor disappears from the screen on the PC and when I close it it shows back up…
Have you customised the states on these sensors? I notice HA isn’t showing the open icon correctly on your screenshots too which should be standard out the box
I’m running HassIO 57.3 and yes all of the sensors are customized with the exception of Entrance PIR Sensor motion. The other motion sensor that is customized does set-off the siren in away mode.