From 2845d25508b212eab48ea52095e93a92bfda6e6a Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Fri, 3 Mar 2023 14:13:19 -0500 Subject: [PATCH] Add sensor for how many computers are on --- sensors/house_stats.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sensors/house_stats.yaml b/sensors/house_stats.yaml index 0bf69c5..f9a40e7 100644 --- a/sensors/house_stats.yaml +++ b/sensors/house_stats.yaml @@ -155,6 +155,17 @@ states.light.front_porch_light ] %} {{ lights | selectattr('state','eq','on') | list | count | int }} + current_computers_on: + friendly_name: Current Computers On + unit_of_measurement: '' + value_template: >- + {% set computers = [ + states.binary_sensor.tony_desktop_on, + states.binary_sensor.tina_desktop_on, + states.binary_sensor.kallen_desktop_on, + states.binary_sensor.basement_server_on + ] %} + {{ computers | selectattr('state','eq','on') | list | count | int }} climate_devices_installed: friendly_name: Climate Devices Installed unit_of_measurement: ''