diff --git a/automations.yaml b/automations.yaml index 58fc5a0..43ea342 100644 --- a/automations.yaml +++ b/automations.yaml @@ -28,7 +28,7 @@ message: "Front Door: {{ states.sensor.front_door.state }}" data: push: - badge: 5 + badge: 1 - alias: Back Door Open @@ -45,6 +45,22 @@ message: "Back Door Sensor: {{ states.sensor.back_door.state }}" data: push: - badge: 5 + badge: 2 + +- alias: Hallway Motion + trigger: + platform: state + entity_id: sensor.hall_motion + condition: + - condition: state + entity_id: group.presence + state: 'not home' + action: + service: notify.all_phones + data: + message: "Hallway Movement: {{ states.sensor.hall_motion.state }}" + data: + push: + badge: 3 diff --git a/sensors.yaml b/sensors.yaml index 591e388..bd31f9e 100644 --- a/sensors.yaml +++ b/sensors.yaml @@ -44,6 +44,23 @@ {% endif %}' friendly_name: 'Back Door' +- platform: template + sensors: + hall_motion: + value_template: >- + {%- if is_state('sensor.aeotec_zw100_multisensor_6_burglar', '3') -%} + Tamper + {%- elif is_state('sensor.aeotec_zw100_multisensor_6_burglar', '8') -%} + Motion + {%- elif is_state('sensor.aeotec_zw100_multisensor_6_burglar', '0') -%} + OK + {%- elif is_state('sensor.aeotec_zw100_multisensor_6_burglar', '254') -%} + OK + {%- else -%} + Unknown + {%- endif -%} + friendly_name: 'Hall Motion' + - platform: template sensors: batt_frontdoor: