2021-01-17 01:59:02 +00:00
|
|
|
- id: alarm-away
|
|
|
|
alias: '[Alarm] Trigger alarm when not at home'
|
|
|
|
trigger:
|
|
|
|
# Use all motion sensors
|
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
2021-01-17 01:59:02 +00:00
|
|
|
to: 'on'
|
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.bedroom_motion_occupancy
|
2021-01-17 01:59:02 +00:00
|
|
|
to: 'on'
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
|
|
to: 'on'
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.kitchen_motion_sensor
|
|
|
|
to: 'on'
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
to: 'on'
|
2021-05-10 09:26:11 +00:00
|
|
|
# Use open/close sensors
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.bathroom_door_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-17 01:59:02 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.bedroom_window_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-18 22:28:22 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.computer_cave_window_1_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-05-06 23:03:36 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.computer_cave_window_2_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-05-06 23:03:36 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.freezer_door_on_off
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-18 22:28:22 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.front_door_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-18 22:28:22 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.living_room_window_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-17 01:59:02 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
state: armed_away
|
|
|
|
action:
|
|
|
|
- service: alarm_control_panel.alarm_trigger
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
|
|
|
|
- id: alarm-night
|
|
|
|
alias: '[Alarm] Trigger alarm at night'
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.bedroom_window_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-18 22:28:22 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.computer_cave_window_1_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-18 22:28:22 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.computer_cave_window_2_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-18 22:28:22 +00:00
|
|
|
- platform: state
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: binary_sensor.freezer_door_on_off
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-05-06 23:03:36 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.front_door_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-05-06 23:03:36 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.living_room_window_open_close
|
2021-05-10 09:26:51 +00:00
|
|
|
to: 'on'
|
2021-01-17 01:59:02 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
state: armed_away
|
|
|
|
action:
|
|
|
|
- service: alarm_control_panel.alarm_trigger
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
|
|
|
|
- id: alarm-arm-away
|
|
|
|
alias: '[Alarm] Arm away'
|
|
|
|
trigger:
|
|
|
|
- platform: zone
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: device_tracker.przemyslaws_iphone
|
2021-01-17 01:59:02 +00:00
|
|
|
zone: zone.home
|
|
|
|
event: leave
|
|
|
|
action:
|
|
|
|
- service: alarm_control_panel.alarm_arm_away
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
|
2021-01-18 22:28:54 +00:00
|
|
|
- id: alarm-disarm
|
|
|
|
alias: '[Alarm] Disarm'
|
|
|
|
trigger:
|
|
|
|
- platform: zone
|
2021-05-06 23:03:36 +00:00
|
|
|
entity_id: device_tracker.przemyslaws_iphone
|
2021-01-18 22:28:54 +00:00
|
|
|
zone: zone.home
|
|
|
|
event: enter
|
|
|
|
action:
|
|
|
|
- service: alarm_control_panel.alarm_arm_away
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
2021-05-06 23:03:36 +00:00
|
|
|
- service: switch.turn_off
|
|
|
|
entity_id: switch.siren_switch
|
2021-01-18 22:28:54 +00:00
|
|
|
|
2021-05-06 23:03:36 +00:00
|
|
|
- id: alarm-pending
|
2021-01-17 01:59:02 +00:00
|
|
|
alias: '[Alarm] Send notification when alarm triggered'
|
2021-05-06 23:03:36 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
to: 'pending'
|
|
|
|
action:
|
|
|
|
- service: notify.notify
|
|
|
|
data:
|
|
|
|
message: "ALARM! Pending for disarm"
|
|
|
|
- service: zwave.set_config_parameter
|
|
|
|
data:
|
|
|
|
node_id: 12
|
|
|
|
parameter: 7
|
|
|
|
value: 'Door bell music'
|
|
|
|
- service: switch.turn_on
|
|
|
|
entity_id: switch.siren_switch
|
|
|
|
|
|
|
|
- id: alarm-triggered
|
|
|
|
alias: '[Alarm] Turn on alarm'
|
2021-01-17 01:59:02 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
to: 'triggered'
|
|
|
|
action:
|
|
|
|
- service: notify.notify
|
|
|
|
data:
|
2021-05-06 23:03:36 +00:00
|
|
|
message: "ALARM! The alarm has been triggered"
|
|
|
|
- service: zwave.set_config_parameter
|
|
|
|
data:
|
|
|
|
node_id: 12
|
|
|
|
parameter: 7
|
|
|
|
value: 'Alarm music'
|
|
|
|
- service: switch.turn_on
|
|
|
|
entity_id: switch.siren_switch
|