diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2023-04-07 17:40:25 +0400 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2023-04-07 17:40:25 +0400 |
commit | 3b67e6bbc959b5d24f12e7df1574e96085431a56 (patch) | |
tree | f6a9b711215e43494ab618a4e6c1987268c46ca5 | |
parent | c933cb78aa1d235e8edffbe2a9d964acad20cfe3 (diff) | |
download | hass-3b67e6bbc959b5d24f12e7df1574e96085431a56.tar.gz hass-3b67e6bbc959b5d24f12e7df1574e96085431a56.tar.bz2 hass-3b67e6bbc959b5d24f12e7df1574e96085431a56.tar.xz hass-3b67e6bbc959b5d24f12e7df1574e96085431a56.zip |
Trigger motion automation also on door-contact
-rw-r--r-- | blueprints/automation/motion/motion_switch.yaml | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/blueprints/automation/motion/motion_switch.yaml b/blueprints/automation/motion/motion_switch.yaml index e28d6da..31ba62c 100644 --- a/blueprints/automation/motion/motion_switch.yaml +++ b/blueprints/automation/motion/motion_switch.yaml @@ -10,6 +10,15 @@ blueprint: domain: binary_sensor # device_class: motion + door_entity: + name: Door Contact + description: Additionally trigger if door opens while no motion detected + default: {} + selector: + entity: + domain: binary_sensor +# device_class: contact + illumination_test: name: Illumination Test description: Select how to check if existing illumination is sufficient @@ -101,6 +110,11 @@ trigger: from: "off" to: "on" - platform: state + id: "door" + entity_id: !input door_entity + from: "off" + to: "on" + - platform: state id: "turn_off" entity_id: !input motion_entity from: "on" @@ -111,8 +125,17 @@ trigger: action: - choose: - conditions: - - condition: trigger - id: "turn_on" + - condition: or + conditions: + - condition: trigger + id: "turn_on" + - condition: and + conditions: + - condition: trigger + id: "door" + - condition: state + entity_id: !input motion_entity + state: 'off' sequence: - choose: - conditions: |