Hi folks. I’ve got a light strip by my door, light.door_lights
, that I’d like to turn on to a color (as specified) when AQI is between a specific range. I have tried both the native WAQI integration as well as the HACS WAQI integration - it doesn’t seem to make a difference either way. Here’s my automation:
alias: AQI Door Lights
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.air_quality_index
above: 0
below: 50
id: Good
- platform: numeric_state
entity_id: sensor.air_quality_index
above: 51
below: 100
id: Moderate
- platform: numeric_state
entity_id: sensor.air_quality_index
above: 101
below: 150
id: Unhealthy for Sensitive Groups
- platform: numeric_state
entity_id: sensor.air_quality_index
above: 151
below: 200
id: Unhealthy
- platform: numeric_state
entity_id: sensor.air_quality_index
above: 201
below: 300
id: Very Unhealthy
- platform: numeric_state
entity_id: sensor.air_quality_index
above: 301
id: Hazardous
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Good
sequence:
- service: light.turn_on
data:
color_name: green
brightness_pct: 10
target:
entity_id: light.door_lights
- conditions:
- condition: trigger
id: Moderate
sequence:
- service: light.turn_on
data:
color_name: yellow
brightness_pct: 10
target:
entity_id: light.door_lights
- conditions:
- condition: trigger
id: Unhealthy for Sensitive Groups
sequence:
- service: light.turn_on
data:
color_name: orange
brightness_pct: 10
target:
entity_id: light.door_lights
- conditions:
- condition: trigger
id: Unhealthy
sequence:
- service: light.turn_on
data:
color_name: red
brightness_pct: 10
target:
entity_id: light.door_lights
- conditions:
- condition: trigger
id: Very Unhealthy
sequence:
- service: light.turn_on
data:
color_name: purple
brightness_pct: 10
target:
entity_id: light.door_lights
- conditions:
- condition: trigger
id: Hazardous
sequence:
- service: light.turn_on
data:
color_name: maroon
brightness_pct: 10
target:
entity_id: light.door_lights
mode: single
Side note: I’ve tried this as a standalone automation, and then one that’s only turned on and triggered when motion is sensed by a nearby motion sensor. Doesn’t work either way.
Is there a smarter/better way to be doing this?