From 9229e05f57d9359d28149da8bc61182fc52c8b12 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Thu, 26 May 2022 23:13:06 -0400 Subject: [PATCH] Added template sensor to figure out night lighting for outdoors --- sensors/house_stats.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sensors/house_stats.yaml b/sensors/house_stats.yaml index 94bcfaa..32eddb5 100644 --- a/sensors/house_stats.yaml +++ b/sensors/house_stats.yaml @@ -126,6 +126,15 @@ states.light.front_porch_light ] %} {{ lights | selectattr('state','eq','on') | list | count }} + front_porch_color_temp: + friendly_name: Front Porch Color Temp + unit_of_measurement: 'mireds' + value_template: > + {% if is_state('light.front_porch_light','off') %} + {{ 0 | int }} + {% else %} + {{ state_attr('light.front_porch_light','color_temp') | int }} + {% endif %} - platform: uptime name: Last Boot