Hello! I have an automation that is triggered by a reolink camera “person detection started”. I wants some RGB lights in my kitchen to flash red for a few seconds and then return to their previous state. this seems to be working, but when the automation ((which is in single mode) gets fired too often (even if I do it manually with the run trigger button in the gui) the stored values become stored as the flashing red and never go back to the previous state. I’m not sure if this is a mistake I made, a bug, or some kind of expected behavior. If anyone has an idea I’d love some help. I’m new to home assistant.
I’m using a magichome rgb controler.
first I gab the current state and store it into a new scene
service: scene.create
data:
scene_id: kitchen_rgb_top_alert
snapshot_entities: light.rgbkitchentopstove
do some light flashing
service: flux_led.set_custom_effect
data:
entity_id: light.rgbkitchentopstove
colors:
- - 255
- 0
- 0
- - 0
- 0
- 0
speed_pct: 85
transition: jump
delay long for 8 seconds.
delay:
hours: 0
minutes: 0
seconds: 8
milliseconds: 0
Then I restore the previous state
service: scene.turn_on
data: {}
target:
entity_id: scene.kitchen_rgb_top_alert
The issue is, if the automation gets triggered multiple times, when this scene is restored, its not the previous state, its the flashing state, as if its storing in the current value even thought the logs show that the automation was skipped because its was still running.
2022-06-12 20:16:40 WARNING (MainThread) [homeassistant.components.automation.backyard_rgb_for_person_detection] BackYard: RGB for Person Detection: Already running
2022-06-12 20:16:40 WARNING (MainThread) [homeassistant.components.automation.backyard_rgb_for_person_detection] BackYard: RGB for Person Detection: Already running
2022-06-12 20:16:41 WARNING (MainThread) [homeassistant.components.automation.backyard_rgb_for_person_detection] BackYard: RGB for Person Detection: Already running
Any idea why this would happen or how to work around it?