Presence sensors for groups now only true if family is home #69

This commit is contained in:
2023-01-30 16:15:53 -05:00
parent ab6f744696
commit 18888f119b

View File

@ -169,11 +169,25 @@ template:
device_class: presence
- binary_sensor:
- name: "Nerds Home"
state: "{{ is_state('binary_sensor.tony_home','on') and is_state('device_tracker.kallen_iphone','home') }}"
state: >-
{% if is_state('group.family','home') %}
{% if is_state('binary_sensor.tony_home','on') and is_state('device_tracker.kallen_iphone','home') %}
true
{% else %}
false
{% endif %}
{% endif %}
device_class: presence
- binary_sensor:
- name: "Parents Home"
state: "{{ is_state('binary_sensor.tony_home','on') and is_state('binary_sensor.tina_home','on') }}"
state: >-
{% if is_state('group.family','home') %}
{% if is_state('binary_sensor.tony_home','on') and is_state('binary_sensor.tina_home','on') %}
true
{% else %}
false
{% endif %}
{% endif %}
device_class: presence
mqtt: