Setting LED Color based on ranges of temperature sensor

I’d’ like to set a light color based on range(s) of temperature sensor.
For instance:
68°-72° set green
73°-79° set yellow
80°+ set red

I can create individual if/then automations for a single range but that leaves me with three different automations and I have no way of knowing or specifying the order in which they run.

Any workarounds or ideas?

Thanks

@Richard_Conner,
The easiest way is to use 2 temperature sensors placed in the same place.
So you can do an automation like this for each color.
You can adjust the temperature offset of each sensor so that they indicate the same.
I have tried it a couple of times and it seems to work fine.

With a single sensor, it could be done, but you would need to create three virtual switches for (green, yellow and red) and 10 automations to turn on the correct color and then adjust the color according to which switch is activated. Too complicated.

Maybe with webcore it can be made easier. I cannot help you with that.

Yep, I think WebCoRE is the answer I was looking for. Found it late last night and appears to have the kind of scripting power I was missing.

Thanks.

1 Like