Hey folks, covered A LOT of ground this weekend…trying to create a sensor that will show:
‘white’ when kelvin > 2500 or mired > 130
and then ‘warm’ for anything else
- platform: template
sensors:
warm_white:
friendly_name: "Warm_White"
value_template: >-
{% if states.light.jamie_light.attributes.mired|float > 130 %}
white
{% else %}
warm
{% endif %}
icon_template: >-
{% if is_state('sensor.warm_white', 'white') %}
mdi:weather-sunny
{% else %}
mdi:weather-night
{% endif %}
[this way i can hit a floorplan button to switch supported lights from warm to white - like time of day etc]
i cant find any docs of how to pull the kelvin/mired attribute (but i can adjust these values)
thanks