"Basement Occupied" makes more sense, doesn't it?

This commit is contained in:
2023-05-01 17:12:29 -04:00
parent 66cdbf4dc7
commit 48f38ccbe6
2 changed files with 17 additions and 17 deletions

View File

@ -746,14 +746,14 @@ automation:
entity_id: timer.basement_studio_door_timer entity_id: timer.basement_studio_door_timer
id: timer-finished id: timer-finished
- platform: state - platform: state
entity_id: binary_sensor.basement_unoccupied entity_id: binary_sensor.basement_occupied
from: 'on'
to: 'off'
id: basement-occupied
- platform: state
entity_id: binary_sensor.basement_unoccupied
from: 'off' from: 'off'
to: 'on' to: 'on'
id: basement-occupied
- platform: state
entity_id: binary_sensor.basement_occupied
from: 'on'
to: 'off'
id: basement-unoccupied id: basement-unoccupied
- platform: state - platform: state
entity_id: entity_id:
@ -794,8 +794,8 @@ automation:
sequence: sequence:
- if: - if:
- condition: state - condition: state
entity_id: binary_sensor.basement_unoccupied entity_id: binary_sensor.basement_occupied
state: 'on' state: 'off'
then: then:
- service: timer.start - service: timer.start
target: target:

View File

@ -241,19 +241,19 @@ template:
unique_id: 8de02d19-60a6-436d-9187-1cfc70d6c297 unique_id: 8de02d19-60a6-436d-9187-1cfc70d6c297
state: "{{ is_state('group.adults','home') and (is_state('person.tony_stork','home') or is_state('person.christina_stork','home')) }}" state: "{{ is_state('group.adults','home') and (is_state('person.tony_stork','home') or is_state('person.christina_stork','home')) }}"
device_class: presence device_class: presence
- name: "Basement Unoccupied" - name: "Basement Occupied"
unique_id: 20039c29-8b9d-436d-ba6c-8f2c2bda1db0 unique_id: 20039c29-8b9d-436d-ba6c-8f2c2bda1db0
state: > state: >
{% if is_state('binary_sensor.tony_desktop_on','off') and is_state('binary_sensor.kallen_desktop_on','off') %} {% if is_state('binary_sensor.tony_desktop_on','off') and is_state('binary_sensor.kallen_desktop_on','off') %}
true
{% elif is_state('binary_sensor.tony_desktop_idle','on') and is_state('binary_sensor.kallen_desktop_idle','on') %}
true
{% elif is_state('binary_sensor.tony_desktop_idle','on') and is_state('binary_sensor.kallen_desktop_on','off') %}
true
{% elif is_state('binary_sensor.kallen_desktop_idle','on') and is_state('binary_sensor.tony_desktop_on','off') %}
true
{% else %}
false false
{% elif is_state('binary_sensor.tony_desktop_idle','on') and is_state('binary_sensor.kallen_desktop_idle','on') %}
false
{% elif is_state('binary_sensor.tony_desktop_idle','on') and is_state('binary_sensor.kallen_desktop_on','off') %}
false
{% elif is_state('binary_sensor.kallen_desktop_idle','on') and is_state('binary_sensor.tony_desktop_on','off') %}
false
{% else %}
true
{% endif %} {% endif %}
- name: "Upstairs Bathroom Occupied" - name: "Upstairs Bathroom Occupied"
unique_id: 7ec69a26-1013-4b0d-8662-a91ab9f040ca unique_id: 7ec69a26-1013-4b0d-8662-a91ab9f040ca