diff --git a/packages/security.yaml b/packages/security.yaml index 09237c0..0f5c2a4 100644 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -80,7 +80,7 @@ sensor: {% else %} mdi:window-open {% endif %} - doors_open: + doors_open: #! This sensor is only for exterior doors, and interior doors that are NOT excluded from security protocols friendly_name: "Doors" unit_of_measurement: 'open' value_template: >- @@ -101,6 +101,27 @@ sensor: {% else %} mdi:door-open {% endif %} + interior_doors_open: # This sensor is not used for security purposes, only for information + friendly_name: "Interior Doors" + unit_of_measurement: 'open' + value_template: >- + {% set doors = [ + states.binary_sensor.basement_studio_door, + states.binary_sensor.downstairs_bathroom_door, + ] %} + {% set doors_open = doors | selectattr('state','eq','on') | list | count %} + {{ doors_open }} + icon_template: >- + {% set doors = [ + states.binary_sensor.basement_studio_door, + states.binary_sensor.downstairs_bathroom_door, + ] %} + {% set doors_open = doors | selectattr('state','eq','on') | list | count %} + {% if doors_open == 0 %} + mdi:door-closed + {% else %} + mdi:door-open + {% endif %} total_faults: friendly_name: Faults unit_of_measurement: 'open'