Lights unexpectically stop during turn_on transition in script

Hi there! I’m rather new to Home Assistant but thanks to this community I can enjoy my growing Smart Home everyday. Unfortunately, I couldn’t find my current issue explained somewhere so thank you very much in advance for your support. This is my first post so in case I’m missing something important, I’m happy to add it.

Goal
Whenever I press a light-on button or trigger my motion sensor I want the light to turn on according to the current time. For example, for lunch the light should have a cold temperature. In the evening, when pressing the same button, it should be warm and dimmed.

Approach
I set up different scenes to have a reusable solution. Then I defined a script that considers the day time and applies the respective scene (Service: scene.turn_on).
One automation triggers when the sensor detects a motion and calls the script. Another automation triggers when the light on button is pressed and calls the script.
I use transitions of 1-5 seconds as parameters for the scene.turn_on service.

Problem
In many (not all) cases, when the script is called, the lights start to fade from 0% to 100% but immediately stop during the transition and the room stays rather dark. When I press the light on button again, the lights turn to 100% brightness. In the log I can see that the script has been started by the automation and in the same second again stopped by the automation.
When I call the scene.turn_on service directly from an automation, this does not happen. When I remove the transition parameter, the lights turn on as expected, too. Additionally, when calling the script manually I couldn’t observe the issue.
Strangly, this behavior does not always appear.

Setup
I use IKEA TRÅDFRI lights, buttons and motion sensors in combination with deCONZ and a Phoscon Conbee ii which is plugged into a Raspberry Pi 3+ running Home Assistant OS.
Versions: HA 2021.3.2, OS 5.11, deCONZ Add-in 6.7.2.

Code: Script
Here is an example script for the bathroom. I have similar scripts for other rooms, too. I used the UI to define the script and automation.

alias: Bathroom - Lights on
sequence:
  - choose:
      - conditions:
          - condition: time
            after: input_datetime.wecker
            before: input_datetime.day
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.bathroom_morning
            data:
              transition: 2
      - conditions:
          - condition: time
            after: input_datetime.day
            before: input_datetime.evening
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.bathroom_day
      - conditions:
          - condition: time
            after: input_datetime.evening
            before: input_datetime.wecker
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.bathroom_evening
            data:
              transition: 2
    default: []
mode: single
icon: 'mdi:shower'

Code: Automation
This automation is for the remote button. Another automation with additional conditions exists for the motion sensor.

alias: Bathroom - Remote
mode: single
trigger:
  - device_id: 8f6a4cd20244b8304801dfe3f0d2eee5
    domain: deconz
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - service: script.bathroom_lights_on

Thank you very much for your help! I’d love to use scripts to make things reusable and not create messy, long automations.

Hi. Thanks for following the instructions for posting code properly formatted! :smiley:

I don’t use scenes, so I can’t help much there. It might be helpful, though, if you could paste the details from the log where it shows the automation starting and stopping the script. Given the way you have written your script & automation, that shouldn’t be happening. At least, that’s assuming the scene.turn_on service doesn’t return until the transition has completed (which, unfortunately, I don’t know.)

1 Like

Hi Phil! Thanks for your reply. I tried my best to make it look like that, thanks :smile:

Here is the log for the bedroom:

It’s in German and I have another script in there, so here’s a brief explaination.

  • eingeschaltet = switched on
  • ausgeschaltet = switched off
  • Schlafzimmer - Toggle: Automation that triggers on button press and calls Schlafzimmer - Toggle Licht
  • Schlafzimmer - Toggle Licht: Script that toggles light. If light is off, call Schlafzimmer - Licht an
  • Schlafzimmer - Licht an: Choose scene depending on time

I guess I could improve my naming convention :thinking:

What is strange in my opinion are the logs at the top. Why does it switch off the scripts? I have added delays at the end of the scripts and the automation but this still happens.

Thanks again for your help!

The Logbook isn’t always as helpful as it should be in a situation like this. It would be much more helpful to get the details from home-assistant.log. Please add the following to your configuration:

logger:
  default: info
  logs:
    homeassistant.components.automation: debug
    homeassistant.components.script: debug

Restart HA, and then cause one of the sequences to run. Then find the corresponding lines in home-assistant.log and post them here.

Also, please be consistent. I.e., if you’re showing log lines from automation/script X, please post exactly those, not a similar but different set of automation/script. Thanks!

1 Like

I didn’t know about the logger, thanks for the hint! You’re absolutely right with the consistency. I’ll append the log and the respective scripts in the following.

Experiment

The daylight scene that should be toggled turns on three lights at 100 % brightness, see below (scene.schlafzimmer_tag).

  1. I pressed the on/off remote button to trigger the automation. The lights all dim to approx. 10 % only. See log down below.
  2. I turned off the lights, waited for 5 seconds and turned them back on. Two lights dim to 100 %, one dims to 10 %. The log is identical to No. 1.
  3. I turned off the lights, waited for 5 seconds and turned them back on. Now, all lights are set to 100 %. The log is identical to No. 1 again.

Log

I cannot see anything suspicious in the log but I’m looking forward to your take on that.

2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Running script sequence
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Executing step call service
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Running script sequence
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Running script sequence
2021-03-17 08:31:10 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Executing step call service

Logbook

The logbook again reveals that the services have been turned off (“ausgeschaltet”) by the automation.schlafzimmer_toggle.

automation.schlafzimmer_toggle

alias: Schlafzimmer - Toggle
trigger:
  - device_id: bf2aefd3132ac41bf67f780c5f44153c
    domain: deconz
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - service: script.schlafzimmer_toggle_licht
mode: restart

script.schlafzimmer_toggle_licht

alias: Schlafzimmer - Toggle Licht
sequence:
  - choose:
      - conditions:
          - condition: device
            type: is_off
            device_id: 38213559af88f17c3fcb4fda7f956352
            entity_id: light.group_bedroom
            domain: light
        sequence:
          - service: script.schlafzimmer_licht_an
      - conditions:
          - condition: device
            type: is_on
            device_id: 38213559af88f17c3fcb4fda7f956352
            entity_id: light.group_bedroom
            domain: light
        sequence:
          - service: light.turn_off
            target:
              device_id: 38213559af88f17c3fcb4fda7f956352
            data:
              transition: 5
    default: []
mode: single
icon: 'mdi:bed'

script.schlafzimmer_licht_an

alias: Schlafzimmer - Licht an
sequence:
  - choose:
      - conditions:
          - condition: time
            after: input_datetime.wecker
            before: input_datetime.day
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.schlafzimmer_morgens
            data:
              transition: 1
      - conditions:
          - condition: time
            after: input_datetime.day
            before: input_datetime.evening
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.schlafzimmer_tag
            data:
              transition: 1
      - conditions:
          - condition: time
            after: input_datetime.evening
            before: input_datetime.wecker
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.schlafzimmer_abends
            data:
              transition: 1
    default: []
mode: single
icon: 'mdi:bed'

scene.schlafzimmer_tag

- id: '1615722854266'
  name: Schlafzimmer - Tag
  entities:
    light.bedroom_ceiling_1:
      min_mireds: 140
      max_mireds: 650
      brightness: 254
      color_temp: 250
      is_deconz_group: false
      friendly_name: light.bedroom.ceiling.1
      supported_features: 43
      state: 'on'
    light.bedroom_ceiling_2:
      min_mireds: 140
      max_mireds: 650
      brightness: 254
      color_temp: 250
      is_deconz_group: false
      friendly_name: light.bedroom.ceiling.2
      supported_features: 43
      state: 'on'
    light.bedroom_ceiling_3:
      min_mireds: 140
      max_mireds: 650
      brightness: 254
      color_temp: 250
      is_deconz_group: false
      friendly_name: light.bedroom.ceiling.3
      supported_features: 43
      state: 'on'

Again, thank you very much for your time and help. It is much appreciated!

Thanks for the extra info & consistency. :smiley:

Unfortunately that doesn’t really shed a lot of light on what’s happening. Please try again, but with this logger setting:

 logger:
  default: info
  logs:
    homeassistant.components.automation: debug
    homeassistant.components.script: debug
    homeassistant.core: debug
    homeassistant.helpers.script: debug

Fair warning that that will generate quite a bit more output. Let’s hope it’s enough.

1 Like

Thanks a lot, Phil! :slight_smile:

Quite a bit more output, indeed. I annotated the log with the physical events.
Again, I conducted three runs (on, then off). The log shows three blocks each:

  1. Automation & Scripts running and intermediate states
  2. Final state of the switched on lights
  3. Automation & Scripts to toggle lights off

Apart from events that indicate the correct state (brightness=254) and then 5 seconds later a far darker setting (brightness=2) in line with what I observe, I cannot find anything helpful so far.

I need to split the log as it exceeds the max char limit.

Thanks a lot for guiding me through this :slight_smile:

# Toggle on lights (first run)
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[L]: id=remote_bedroom, unique_id=5c:02:72:ff:fe:53:93:a6, event=1002, device_id=bf2aefd3132ac41bf67f780c5f44153c>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Schlafzimmer - Toggle, entity_id=automation.schlafzimmer_toggle, source=event 'deconz_event'>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-17T23:39:38.374228+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:12:50.113540+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_toggle_licht, service_data=>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Toggle Licht, entity_id=script.schlafzimmer_toggle_licht>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=None, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:10:23.641658+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:12:50.129589+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:12:50.129806+01:00>>
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Running script sequence
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Executing step call service
2021-03-18 10:12:50 DEBUG (SyncWorker_2) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:12:50.129589+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:12:50.129806+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:12:50.129589+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:12:50.129806+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_licht_an, service_data=>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Licht an, entity_id=script.schlafzimmer_licht_an>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=off; last_triggered=None, mode=single, current=0, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:10:23.640059+01:00>, new_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:12:50.159714+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:12:50.159971+01:00>>
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Running script sequence
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Running script sequence
2021-03-18 10:12:50 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Executing step call service
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=scene, service=turn_on, service_data=transition=1, entity_id=['scene.schlafzimmer_tag']>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_1, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_2, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_3, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:10:21.530749+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=off; min_mireds=153, max_mireds=500, effect_list=['colorloop'], is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:10:21.547582+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:10:21.520833+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:10:21.517668+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:12:50.159714+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:12:50.159971+01:00>, new_state=<state script.schlafzimmer_licht_an=off; last_triggered=2021-03-18T10:12:50.159714+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:12:50.309393+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:12:50.129589+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:12:50.129806+01:00>, new_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:12:50.129589+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:12:50.325860+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:12:50.113540+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:12:50.113540+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=428, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=428, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=426, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=428, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=426, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=424, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>>
2021-03-18 10:12:50 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=426, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=424, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>

# Change in color temp occurs 5 seconds later, all lights @ 2 brightness (max. is 255)
2021-03-18 10:12:55 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=428, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>>
2021-03-18 10:12:55 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=424, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:12:55 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=426, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>>
2021-03-18 10:12:55 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=424, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>>

# Toggle off lights (first run)
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[L]: id=remote_bedroom, unique_id=5c:02:72:ff:fe:53:93:a6, event=1002, device_id=bf2aefd3132ac41bf67f780c5f44153c>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Schlafzimmer - Toggle, entity_id=automation.schlafzimmer_toggle, source=event 'deconz_event'>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:12:50.113540+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:07.187028+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:07 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-18 10:13:07 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_toggle_licht, service_data=>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Toggle Licht, entity_id=script.schlafzimmer_toggle_licht>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:12:50.129589+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:12:50.325860+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:07.203832+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:07.204090+01:00>>
2021-03-18 10:13:07 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-18 10:13:07 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 2: Running script sequence
2021-03-18 10:13:07 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 2: Executing step call service
2021-03-18 10:13:07 DEBUG (SyncWorker_2) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:07.203832+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:07.204090+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:07.203832+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:07.204090+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_off, service_data=transition=5, device_id=['38213559af88f17c3fcb4fda7f956352']>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, hs_color=(30.0, 43.137), rgb_color=(255, 200, 145), xy_color=(0.443, 0.379), is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:12:50.293750+01:00>, new_state=<state light.bedroom_ceiling_3=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:07.276994+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, hs_color=(30.0, 43.137), rgb_color=(255, 200, 145), xy_color=(0.443, 0.379), is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:12:50.272895+01:00>, new_state=<state light.bedroom_ceiling_2=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:07.281480+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:12:50.238162+01:00>, new_state=<state light.bedroom_ceiling_1=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:07.301956+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:12:50.254348+01:00>, new_state=<state light.group_bedroom=off; min_mireds=153, max_mireds=500, effect_list=['colorloop'], is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:07.313312+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:07.203832+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:07.204090+01:00>, new_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:07.203832+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:07.316043+01:00>>
2021-03-18 10:13:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:07.187028+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:07.187028+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>

# Toggle on lights (second time)
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[L]: id=remote_bedroom, unique_id=5c:02:72:ff:fe:53:93:a6, event=1002, device_id=bf2aefd3132ac41bf67f780c5f44153c>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Schlafzimmer - Toggle, entity_id=automation.schlafzimmer_toggle, source=event 'deconz_event'>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:07.187028+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:21.481008+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_toggle_licht, service_data=>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Toggle Licht, entity_id=script.schlafzimmer_toggle_licht>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:07.203832+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:07.316043+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:21.496832+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:21.497046+01:00>>
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Running script sequence
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Executing step call service
2021-03-18 10:13:21 DEBUG (SyncWorker_5) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:21.496832+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:21.497046+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:21.496832+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:21.497046+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_licht_an, service_data=>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Licht an, entity_id=script.schlafzimmer_licht_an>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=off; last_triggered=2021-03-18T10:12:50.159714+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:12:50.309393+01:00>, new_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:13:21.532661+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:21.532898+01:00>>
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Running script sequence
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Running script sequence
2021-03-18 10:13:21 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Executing step call service
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=scene, service=turn_on, service_data=transition=1, entity_id=['scene.schlafzimmer_tag']>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_1, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_2, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_3, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:07.301956+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:21.626864+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:07.281480+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:21.646105+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=off; min_mireds=153, max_mireds=500, effect_list=['colorloop'], is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:07.313312+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:13:21.532661+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:21.532898+01:00>, new_state=<state script.schlafzimmer_licht_an=off; last_triggered=2021-03-18T10:13:21.532661+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:21.676541+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:07.276994+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:21.682073+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:21.496832+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:21.497046+01:00>, new_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:21.496832+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:21.694723+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:21.481008+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:21.481008+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:21.626864+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:21.626864+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:21.646105+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:21.646105+01:00>>
2021-03-18 10:13:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:21.682073+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:21.682073+01:00>>

# Two lights are @ 254 brightness, one light is @ 21 brightness
2021-03-18 10:13:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:21.626864+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:21.626864+01:00>>
2021-03-18 10:13:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>>
2021-03-18 10:13:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:21.646105+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=21, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:21.646105+01:00>>
2021-03-18 10:13:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=21, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>>
2021-03-18 10:13:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:21.682073+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:21.682073+01:00>>
2021-03-18 10:13:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=21, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>>

# Toggle off lights (second time)
2021-03-18 10:13:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[L]: id=remote_bedroom, unique_id=5c:02:72:ff:fe:53:93:a6, event=1002, device_id=bf2aefd3132ac41bf67f780c5f44153c>
2021-03-18 10:13:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Schlafzimmer - Toggle, entity_id=automation.schlafzimmer_toggle, source=event 'deconz_event'>
2021-03-18 10:13:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:21.481008+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:31.959641+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:31 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-18 10:13:31 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-18 10:13:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_toggle_licht, service_data=>
2021-03-18 10:13:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Toggle Licht, entity_id=script.schlafzimmer_toggle_licht>
2021-03-18 10:13:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:21.496832+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:21.694723+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:31.977634+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:31.977867+01:00>>
2021-03-18 10:13:31 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-18 10:13:31 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 2: Running script sequence
2021-03-18 10:13:31 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 2: Executing step call service
2021-03-18 10:13:31 DEBUG (SyncWorker_2) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:31.977634+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:31.977867+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:31.977634+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:31.977867+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_off, service_data=transition=5, device_id=['38213559af88f17c3fcb4fda7f956352']>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:21.682073+01:00>, new_state=<state light.bedroom_ceiling_3=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:32.105895+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=21, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:21.646105+01:00>, new_state=<state light.bedroom_ceiling_2=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:32.126284+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:21.626864+01:00>, new_state=<state light.bedroom_ceiling_1=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:32.129726+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:21.657119+01:00>, new_state=<state light.group_bedroom=off; min_mireds=153, max_mireds=500, effect_list=['colorloop'], is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:32.147490+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:31.977634+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:31.977867+01:00>, new_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:31.977634+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:32.150308+01:00>>
2021-03-18 10:13:32 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:31.959641+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:31.959641+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>

# Toggle on lights (third time)
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[L]: id=remote_bedroom, unique_id=5c:02:72:ff:fe:53:93:a6, event=1002, device_id=bf2aefd3132ac41bf67f780c5f44153c>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Schlafzimmer - Toggle, entity_id=automation.schlafzimmer_toggle, source=event 'deconz_event'>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:31.959641+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:48.285120+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_toggle_licht, service_data=>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Toggle Licht, entity_id=script.schlafzimmer_toggle_licht>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:31.977634+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:32.150308+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:48.302751+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:48.302965+01:00>>
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Running script sequence
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 1: Executing step call service
2021-03-18 10:13:48 DEBUG (SyncWorker_4) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:48.302751+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:48.302965+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:48.302751+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:48.302965+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_licht_an, service_data=>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Licht an, entity_id=script.schlafzimmer_licht_an>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=off; last_triggered=2021-03-18T10:13:21.532661+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:21.676541+01:00>, new_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:13:48.329793+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:48.330023+01:00>>
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Running script sequence
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Running script sequence
2021-03-18 10:13:48 INFO (MainThread) [homeassistant.components.script.schlafzimmer_licht_an] Schlafzimmer - Licht an: Choose at step 1: choice 2: Executing step call service
2021-03-18 10:13:48 DEBUG (SyncWorker_2) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:13:48.329793+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:48.330023+01:00>, new_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:13:48.329793+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:48.330023+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=scene, service=turn_on, service_data=transition=1, entity_id=['scene.schlafzimmer_tag']>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_1, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_2, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.bedroom_ceiling_3, transition=1.0, brightness=254, color_temp=250>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:32.129726+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:48.409785+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=off; min_mireds=153, max_mireds=500, effect_list=['colorloop'], is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:32.147490+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:32.126284+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:48.439422+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:32.105895+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:48.475909+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_licht_an, old_state=<state script.schlafzimmer_licht_an=on; last_triggered=2021-03-18T10:13:48.329793+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:48.330023+01:00>, new_state=<state script.schlafzimmer_licht_an=off; last_triggered=2021-03-18T10:13:48.329793+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Licht an, icon=mdi:bed @ 2021-03-18T10:13:48.488824+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:48.302751+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:48.302965+01:00>, new_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:48.302751+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:48.501194+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:48.285120+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:48.285120+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:48.409785+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:48.409785+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:48.439422+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:48.439422+01:00>>
2021-03-18 10:13:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:48.475909+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:48.475909+01:00>>

# All three lights are at their target value brightness=254
2021-03-18 10:13:53 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:48.409785+01:00>, new_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:48.409785+01:00>>
2021-03-18 10:13:53 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=2, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>>
2021-03-18 10:13:53 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:48.439422+01:00>, new_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:48.439422+01:00>>
2021-03-18 10:13:53 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=2, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:48.475909+01:00>, new_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:48.475909+01:00>>

# Toggle off lights (third time)
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[L]: id=remote_bedroom, unique_id=5c:02:72:ff:fe:53:93:a6, event=1002, device_id=bf2aefd3132ac41bf67f780c5f44153c>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Schlafzimmer - Toggle, entity_id=automation.schlafzimmer_toggle, source=event 'deconz_event'>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:48.285120+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:58.330102+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>
2021-03-18 10:13:58 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Running automation actions
2021-03-18 10:13:58 INFO (MainThread) [homeassistant.components.automation.schlafzimmer_toggle] Schlafzimmer - Toggle: Executing step call service
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=schlafzimmer_toggle_licht, service_data=>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Schlafzimmer - Toggle Licht, entity_id=script.schlafzimmer_toggle_licht>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:48.302751+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:48.501194+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:58.343409+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:58.343629+01:00>>
2021-03-18 10:13:58 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Running script sequence
2021-03-18 10:13:58 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 2: Running script sequence
2021-03-18 10:13:58 INFO (MainThread) [homeassistant.components.script.schlafzimmer_toggle_licht] Schlafzimmer - Toggle Licht: Choose at step 1: choice 2: Executing step call service
2021-03-18 10:13:58 DEBUG (SyncWorker_2) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:58.343409+01:00, mode=single, current=1, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:58.343629+01:00>, new_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:58.343409+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:58.343629+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_off, service_data=transition=5, device_id=['38213559af88f17c3fcb4fda7f956352']>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_3, old_state=<state light.bedroom_ceiling_3=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:48.475909+01:00>, new_state=<state light.bedroom_ceiling_3=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.3, supported_features=43 @ 2021-03-18T10:13:58.391096+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=254, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>, new_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_2, old_state=<state light.bedroom_ceiling_2=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:48.439422+01:00>, new_state=<state light.bedroom_ceiling_2=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.2, supported_features=43 @ 2021-03-18T10:13:58.409924+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.bedroom_ceiling_1, old_state=<state light.bedroom_ceiling_1=on; min_mireds=140, max_mireds=650, brightness=254, color_temp=250, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:48.409785+01:00>, new_state=<state light.bedroom_ceiling_1=off; min_mireds=140, max_mireds=650, is_deconz_group=False, friendly_name=light.bedroom.ceiling.1, supported_features=43 @ 2021-03-18T10:13:58.412647+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.group_bedroom, old_state=<state light.group_bedroom=on; min_mireds=153, max_mireds=500, effect_list=['colorloop'], brightness=0, color_temp=250, is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:48.426090+01:00>, new_state=<state light.group_bedroom=off; min_mireds=153, max_mireds=500, effect_list=['colorloop'], is_deconz_group=True, all_on=False, friendly_name=Schlafzimmer, supported_features=63 @ 2021-03-18T10:13:58.431505+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.schlafzimmer_toggle_licht, old_state=<state script.schlafzimmer_toggle_licht=on; last_triggered=2021-03-18T10:13:58.343409+01:00, mode=single, current=1, last_action=call service, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:58.343629+01:00>, new_state=<state script.schlafzimmer_toggle_licht=off; last_triggered=2021-03-18T10:13:58.343409+01:00, mode=single, current=0, friendly_name=Schlafzimmer - Toggle Licht, icon=mdi:bed @ 2021-03-18T10:13:58.435295+01:00>>
2021-03-18 10:13:58 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.schlafzimmer_toggle, old_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:58.330102+01:00, mode=restart, current=1, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>, new_state=<state automation.schlafzimmer_toggle=on; last_triggered=2021-03-18T10:13:58.330102+01:00, mode=restart, current=0, id=1615724335273, friendly_name=Schlafzimmer - Toggle @ 2021-03-18T10:10:24.832052+01:00>>

Thanks again for the additional details.

So, I can’t explain why the Logbook says the automation is turning off the two scripts (the one it calls, and the one called by that script.) That is probably some weird side effect of how the Logbook works. I don’t know as much about that. Nor does it really matter (other than it is confusing.)

According to the logger, which is what really indicates what is happening, as far as the automation & scripts are concerned, they’re doing what they are supposed to do. I.e., the automation calls the first script, the first script calls the second script, the second script turns on the scene, and the scene turns on the lights, or at least attempts to. Then immediately after that the scripts finish, in reverse order (as expected, i.e., second script finishes, then the first script finishes), and the automation finishes. Again, everything as designed/expected from the perspective of the automation and scripts. In particular, I see no signs of the scripts or automation being “cancelled,” stopped or otherwise being turned off, for any reason other than completing normally.

So looking more closely at the scene, as I mentioned, it turns around and calls the light.turn_on service for each of the three lights. That’s also to be expected. But that all finishes basically immediately, allowing the scripts and automation to complete immediately. Then the actual processing of the lights happens asynchronously (i.e., in the “background”.) I think that is probably as it should be, too.

BUT, of course, the lights are not actually doing what you expect.

Bottom line - I think this has more to do with how the scene and lights are working than anything to do with the automation and scripts.

I’m not sure what to tell you at this point.

1 Like

Thank you for the detailed explanation! I agree, it could come down to an issue with deCONZ, the scene/light implementation, or the IKEA tradfri implementation.
I recently upgraded to 2021.3 but changed to this setup with automations, scripts and scenes at the same time so it’s hard to tell if 2021.3 is responsible for the behavior.
Then I’ll just wait for updates and use loops in the meantime to call the scripts multiple times. Or I’ll simply ditch the scenes and hardcode everything in the scripts.

Anyways, thank you very much for your time and patience. I’m really amazed at how much this community is willing to help newbies like me :wink:

No problem. But, to be completely open, I had a personal interest, too, since I (re)wrote a lot of the current script/automation infrastructure, so I wanted to make sure I didn’t mess anything up! :sweat_smile:

1 Like

Oh wow! Well, you’re personal interest in code quality is still serving everybody :wink: So thanks a lot for your work!