Hi, I have recently tried to improve an automation I have where I flash lights in my house to remind me to put the bins out. The automation is intended to change the lights to the colour of the relevant bin for 3 seconds, and then put the lights back to their original state.
FWIW: I am running supervisor-2021.03.3 / core-2021.3.0
The behaviour I see however, is that when I start with no scene, the automation works as expected - in the snippet below, the lights change from their current state to green for 3 seconds and then back to their original state.
However, if I then re-run the automation (via the run actions from the automation page), the lights change to green again, and never change back.
I have tried various version of HA over the last month or so, read forums, tweaked config, and am at a loss on how to further troubleshoot my issue, and would love some help/suggestions.
I am also wondering if having the lights grouped together (light.lounge_room) and used in other scripts/integrations might somehow be impacting this?
Possible relevant parts of my config:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
logger:
default: warning
logs:
homeassistant.components.scene: debug
scene: !include scenes.yaml
scenes.yaml:
[]
Automation below:
- id: '1595317464144'
alias: 'Lounge: (bins) - set lights for green bin'
description: ''
trigger:
- at: '21:00'
platform: time
condition:
- condition: state
entity_id: sensor.green_bin
state: '0'
action:
- service: scene.create
data:
snapshot_entities:
- light.lounge_light_tv_end
- light.lounge_light_window_end
scene_id: before
- data:
scene_name: Green bin
service: script.1592721230266
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- scene: scene.before
script:
'1592721230266':
alias: Set Lounge Room lights to mode
sequence:
- data:
group_name: Lounge room
data_template:
scene_name: '{{scene_name}}'
service: hue.hue_activate_scene
mode: single
Finally, the logs show nothing related to scenes at all (so the log config for debug does not seem to shed further light on this).
$ sudo grep scene home-assistant.log
2021-03-05 11:09:39 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
2021-03-05 11:09:46 INFO (MainThread) [homeassistant.components.scene] Setting up scene.tahoma