Improve presence and lighting control in the basement

This commit is contained in:
2023-03-18 20:56:14 -04:00
parent e7f2580497
commit 61641beec9
3 changed files with 57 additions and 16 deletions

View File

@ -265,6 +265,20 @@ template:
false
{% endif %}
device_class: presence
- name: "Basement Unoccupied"
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
{% endif %}
mqtt:
sensor: