[Rule] Weather Temperature Beacon on Inovelli Dimmer and Switch Child LED

Original Post: There is a building in Toronto that has a rooftop weather beacon that shows the weather for the next 8 hours. The "tower" has a particular light pattern depending on the weather that's predicted to come. I am looking to replicate this functionality on the LED indicator strip on an Inovelli dimmer.

The programming is way out of my league, but perhaps there is someone that may be interested in taking up the challenge!

I can imagine this can be adapted to other devices as well.

Update (2021-Mar-14): See post 3 for a temperature-based rule to change the colour of Inovelli switch LEDs. The LED child device has to be enabled in the devices section of Hubitat.

This would be pretty easy to do on an Inovelli dimmer (or switch), as long as you don't manually clear the notification or use it for other notifications, too (in which case the notification will disappear; you can only set one at a a time, and they are not queued). A rule for that would be pretty easy to write, and I'd be happy to help if needed.

So that leaves the more complicated question: do you have weather integrated into Hubitat right now? If not, there are a few ways that this could be done, but any will require a bit of effort to set up (and recognition of the fact that any of the cloud services could change their mind and stop integrations from working at any time, as a few have done in the recent past).

I ended up coming up with the following just for current temperatures. I didn't end up doing forecasting as there's no freely available weather driver (that I could find) for my region (Canada).

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

I'm still tweaking which colours look good on the LED bars. I tried to use the colour range of the temperature widget on an Apple Watch. This rule is good enough for me to add some subtle variability to the look of the dimmers and switches with some meaning.