Hi Everyone,
I have several automatons that use my VA LED ring light to have a visible vs. audio alert. I have an alert that flashes it red when someone is approaching my front door while I’m working. This VA sits on my desk and I work from home. So having an audible alert isn’t ideal. Flashing red for 30 seconds alerts me, even while I"m in a meeting. The issue I’m trying to solve is resetting the LED ring light back to the original ‘preset’ color.
I have each LED Ring lights favorite colors set. The favorite color in slot ‘0’ is the one I want to set it back two. I have been trying for several days to do this via the alert automation. Having the last action be setting it back to the original color.
I’m not sure what format the Light’s favorite colors are stored in and I’m not sure how to use it in YAML in a Light On action.
I’m not wanting to use a scene as I don’t believe that is appropriate.
I figured it using a scene as a place holder.
I created a scene using one of the HA Ring LED lights on and saved it as " before_alert"
id: "1775091428830"
name: before_alert
entities:
light.joe_led_ring:
supported_color_modes:
- rgb
color_mode: rgb
brightness: 255
hs_color:
- 180
- 100
rgb_color:
- 0
- 255
- 255
xy_color:
- 0.151
- 0.343
icon: mdi:circle-outline
friendly_name: LED Ring - Joe
supported_features: 40
state: "on"
metadata:
light.joe_led_ring:
entity_only: true
icon: m3o:mobile-alert
I then setup on automation to save the current state after turning on the HA LED light.
I use the light and RGB color as fields to call this from other automatons. I send in the light and the color I want for the alert. I was thinking of even adding fields for how many flashes and the delay length.
The automation will flash the light one time as it’s current set color, flash twice as the chosen RBG color, flash once as the original color and then turn off.
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: " {{ alert_light }} "
data:
brightness_pct: 100
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: scene.create
metadata: {}
data:
scene_id: before_alert
snapshot_entities:
- light.joe_led_ring
enabled: true
- repeat:
count: 2
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id: " {{ alert_light }} "
data:
rgb_color: " {{ alert_color }} "
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: " {{ alert_light }} "
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: scene.turn_on
metadata: {}
data: {}
target:
entity_id: scene.test_scene
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: " {{ alert_light }} "
enabled: true
fields:
alert_light:
selector:
entity: {}
default: light.joe_led_ring
name: alert light
description: Light for alert
required: true
alert_color:
selector:
color_rgb: {}
name: alert color
required: true
alias: Alert - Flash Light
description: ""
icon: m3o:person-alert