diff --git a/packages/lighting_and_scenes.yaml b/packages/lighting_and_scenes.yaml index 0d28a11..647a926 100644 --- a/packages/lighting_and_scenes.yaml +++ b/packages/lighting_and_scenes.yaml @@ -746,14 +746,14 @@ automation: entity_id: timer.basement_studio_door_timer id: timer-finished - platform: state - entity_id: binary_sensor.basement_unoccupied - from: 'on' - to: 'off' - id: basement-occupied - - platform: state - entity_id: binary_sensor.basement_unoccupied + entity_id: binary_sensor.basement_occupied from: 'off' to: 'on' + id: basement-occupied + - platform: state + entity_id: binary_sensor.basement_occupied + from: 'on' + to: 'off' id: basement-unoccupied - platform: state entity_id: @@ -794,8 +794,8 @@ automation: sequence: - if: - condition: state - entity_id: binary_sensor.basement_unoccupied - state: 'on' + entity_id: binary_sensor.basement_occupied + state: 'off' then: - service: timer.start target: diff --git a/packages/presence.yaml b/packages/presence.yaml index 2d5a8e6..b27c205 100644 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -241,19 +241,19 @@ template: 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')) }}" device_class: presence - - name: "Basement Unoccupied" + - name: "Basement Occupied" unique_id: 20039c29-8b9d-436d-ba6c-8f2c2bda1db0 state: > {% 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 + {% 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 %} - name: "Upstairs Bathroom Occupied" unique_id: 7ec69a26-1013-4b0d-8662-a91ab9f040ca