A coupe of things not working as expected however. I can’t seem to get the clock to display even though I have it set to true in alarm.yaml.
Do you have a sensor.time defined in Home Assistant?
Also is there a way of changing the delay to disable the siren once its been triggered? there seems to be about a 5 second delay between disarming the alarm to when the siren stops.
Could you post your disarm automation? What type of siren do you use? My x3 zwave sirens stop immediately.
I managed to get the time displayed thanks to the post from @tremebundo who mentioned adding the sensor.time.
I use a MQTT siren I made. Very responsive from within HA and HomeKit app (Home). I’m also using the standard disarm automation except for the change of siren name, see below:
- id: alarm_disarmed
alias: '[Alarm] Disarmed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'disarmed'
action:
- service: notify.pushbullet
data:
message: 'Alarm Disabled'
target: email/[email protected]
- service: switch.turn_off
entity_id: switch.siren
- data:
message: 'The house alarm has been Deactivated'
service: notify.example_phone_tts
I’ve just realised that I’ve left extra notifications in that aren’t being used, maybe they are causing the delay?
I suspect HA executes the automations sequentially so it will wait until it has completed your pushbullet notification before switching off your siren.
Ok so I tweaked the automation and removed notifications I don’t have (pushbullet) the alarm arms etc but the siren will not trigger. There seems to be an automation formatting error but for the life of me can’t work it out as the .YAML validates fine and I’m getting the notifications I have set fine… Can someone cast their eye other it?:
- id: alarm_armed_away
alias: '[Alarm] Away Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_away'
action:
- data:
message: 'The house alarm has been switched on in away mode. Goodbye'
service: notify.all_iphones
- id: alarm_armed_home
alias: '[Alarm] Home Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_home'
action:
- data:
message: 'The house alarm has been switched on in home mode. Goodnight'
service: notify.all_iphones
- id: alarm_arming_away
alias: '[Alarm] Away Mode Arming'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'pending'
action:
- data:
message: 'House alarm activating, ensure all doors and windows are closed'
service: notify.all_iphones
- 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.siren
- data:
message: 'The house alarm has been Deactivated'
service: notify.all_iphones
- 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.siren
service: notify.all_iphones
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.all_iphones
data:
message: 'Hello, the house alarm has been tripped. Please deactivate'
service: notify.all_iphones
- service: notify.all_iphones
data:
message: 'Hello, the house alarm has been tripped. Please deactivate'
service: notify.all_iphones <------------------------
You have an extraneous service call here in - id: alarm_warning
- id: alarm_armed_away
alias: '[Alarm] Away Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_away'
action:
- service: notify.all_iphones
data:
message: 'The house alarm has been switched on in away mode. Goodbye'
- id: alarm_armed_home
alias: '[Alarm] Home Mode Armed'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'armed_home'
action:
- service: notify.all_iphones
data:
message: 'The house alarm has been switched on in home mode. Goodnight'
- id: alarm_arming_away
alias: '[Alarm] Away Mode Arming'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'pending'
action:
- service: notify.all_iphones
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.siren
- service: notify.all_iphones
data:
message: 'The house 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.siren
- service: notify.all_iphones
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.all_iphones
data:
message: 'Hello, the house alarm has been tripped. Please deactivate'
I’m maybe doing something wrong, again, but I’ve trying to trigger the alarm automations from the Alexa Cloud. I can see the automations in Alexa and I can say ‘turn on away mode’ for example, Alexa says ‘OK’ but nothing happends. I get no UI change in the Alarm front end, no notifications on my iOS device (they happen if I arm the alarm normally)
I’m guessing the alarm UI changes only happen when you are triggering via the Alarm panel? is there anyway to build this into a future version so that when you run the armed automation you see the changes in the UI.
Has anybody used this in conjunction with HADashboard or something similar? Curious if I could use one tablet with my HADashboard and switch to the alarm panel as needed.
The UI responds as soon as the alarm mode has changed irrespective of device/method used to set the alarm.
For example I can use a mobile device to set the alarm either via the interface or using an android app utilizing MQTT and the UI on a wall mounted panel will change instantly.
I have not tried alexa cloud but I’m interested as I have several dots scattered around the house so will have a play. Google assistant works just fine
Ok I think I’ve been trying to trigger it via the automations not the ‘alarm_control_panel.house’. What domain would I include to trigger it via Alexa, Switch? and would the states be simple ‘arm’ ‘disarm’?