diff --git a/lovelace/03_system.yaml b/lovelace/03_system.yaml index 1bf81ae..e8d7523 100644 --- a/lovelace/03_system.yaml +++ b/lovelace/03_system.yaml @@ -8,6 +8,7 @@ cards: entities: - entity: input_boolean.routine_welcome_home - entity: automation.presence_arrival_detection + - entity: automation.door_opened_while_away - entity: automation.coming_home - entity: automation.leaving_home - entity: automation.cube_knock diff --git a/packages/modules/security.yaml b/packages/modules/security.yaml index 6a896b7..8cacfb2 100644 --- a/packages/modules/security.yaml +++ b/packages/modules/security.yaml @@ -92,3 +92,24 @@ automation: - delay: 00:00:10 - service: switch.turn_off entity_id: switch.camera + + - id: door_opened_while_away + alias: Security · Door opened while away + trigger: + - platform: state + entity_id: binary_sensor.front_door_on_off + to: "on" + condition: + condition: and + conditions: + - condition: state + entity_id: person.georgi + state: "not_home" + - condition: state + entity_id: input_boolean.guest_mode + state: "off" + action: + - service: script.telegram_say + data: + title: "🛡 *Security Module · Door opened while away*" + message: "It seems like the front door was opened while you are away! Check the camera!"