Multi-Colour LED for Outdoor Temperature

In case anyone needs inspiration for what to actually do with their RGB bar on their dimmer/switch, I’ve been using Hubitat to set colours based on outside temperature using Rule Machine. I’m sure it could be done on other hubs and would likely be nicer as an app.

I like it because it discretely adds a little variability to appearance of the switch and some actionable info to boot.

This is my code:

Trigger Events: Temperature of Weather *changed*

IF (Temperature of Weather) >= 32 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 2 -> Sat 100
ELSE-IF (Temperature of Weather) >= 24 AND <32 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 11 -> Sat 100
ELSE-IF (Temperature of Weather) >= 18 AND <24 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 22 -> Sat 100
ELSE-IF (Temperature of Weather) >= 12 AND <18 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 33 -> Sat 100
ELSE-IF (Temperature of Weather) >= 7 AND <12 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 44 -> Sat 100
ELSE-IF (Temperature of Weather) >= 0 AND <7 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 55 -> Sat 100
ELSE-IF (Temperature of Weather) >= -6 AND <0 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 66 -> Sat 100
ELSE-IF (Temperature of Weather) >= -15 AND <-6 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 77 -> Sat 100
ELSE-IF (Temperature of Weather) >= -30 AND <-15 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 83 -> Sat 100
ELSE-IF (Temperature of Weather) > -40 AND <-30 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 92 -> Sat 100
ELSE-IF (Temperature of Weather) <= -40 THEN
	Set color: Inovelli Dimmer (Child LED Device) -> Custom Color -> Hue 98 -> Sat 100
END-IF

It helps to group all the LED child devices into a single device, which is then commanded by the rule above.

4 Likes

@Alpacalunch,
Thanks for sharing the code! I believe I’m going to set this up on the front and back porch switches.
Very clever!

Greg