Hooking Purple-Air Sensor up to Inovelli LED via Home-Assistant

Hey friends! I live in California and, like everyone else, have been plagued with terrible air quality due to the awful fires happening all around. My 4yo son was asking everyday, “Daddy, is it safe to play outside yet?”

Instead of pulling my phone out every time, I wanted to make it so the whole family could know (at a glance) what the air quality was like.

So I wrote a python script that can be tied into Home Assistant to report on a specific PurpleAir sensor as well as giving a color value to be sent to our Inovelli Red Series Dimmer Switch near the front door.

image
image image

Now my son tells me “Dad, can we go play outside, it’s now green out!”

6 Likes

Dang this is awesome, thanks for sharing!!

1 Like

Just when you thought YOUR weather notification thing was cool, lol!!! :rofl: :rofl: :rofl:

1 Like

Of course! I also forgot to mention that the color value is dynamic. For example, as the AQI moves from Good to Moderate the light transitions from a nice bright green to a more yellow-green and finally solid yellow. So you can make a more accurate judgement (“ehh, it’s more yellow than orange, we can be outside for a bit”)

Dude, for real lol.

@stjohnjohnson throwing out the python script flex. I love it! Here I am playing with IFTTT in the cloud.

I’m so excited to get this to work… I am running OpenZWave instead of the builtin ZWave integration. I’m trying to run the ozw.set_config_parameter in the Dev Tools of HA and am getting the following error: Failed to call service ozw/set_config_parameter. '>' not supported between instances of 'str' and 'int'. Any ideas how to resolve?

According to the OZW.SET_CONFIG_PARAMETER documentation, the node, parameter, and value need to be integers. You might need to add an int filter according to the automation template rules.