Core: Turning on scenes from within a scene no longer works

Created on 23 Nov 2019  路  21Comments  路  Source: home-assistant/core

Home Assistant release with the issue: 0.102.1

Last working Home Assistant release (if known): Somewhere between 0.9* and 0.102

Operating environment (Hass.io/Docker/Windows/etc.): Hassbian.

Integration: scenes.

Description of problem: Referencing scenes from within scenes used to work. Doesn't anymore.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- name: ljusniva5
  entities:
  scene.lampan_vid_koksbanken_svagare:
    state: on

What should happen: scene.lampan_vid_koksbanken_svagare activates.
What actually happens: nothing, and with the following in the logs:

WARNING (MainThread) [homeassistant.helpers.state] Integration scene does not
support reproduce state

Other entities, that aren't "sub-scenes" in the main scene, _does_ activate. It's just "sub-scenes" that are affected.

scene

Most helpful comment

Long story short, neither scripts nor scenes will be usable in scenes in the near future.

That is disappointing.

All 21 comments

Hey there @home-assistant/core, mind taking a look at this issue as its been labeled with a integration (scene) you are listed as a codeowner for? Thanks!

Scenes are not intended to be used by other scenes. Some recent changes have made this impossible.

I have the same problem, furthermore turning on scripts from within a scene also does not work anymore in version 0.102, it used to work in 0.101.

The nice thing about scenes is that they run in parallel while scripts run sequential, therefore I used to make a single scene to fire a whole bunch of scripts in parallel.

Is turning on scripts and other scenes from within a scene coming back, or is this a conscious change that is not going to be changed?

Scenes are based on the state of an entity. All entities that provide a meaningful state can be used in a scene.

Scripts and scenes and some other entities do not have a meaningful state, so they cannot be used in scenes. Scenes do not notice whether they are active or not, they are always scening. Scripts are on or off indeed, but this is only a momentary state and you don't want the script to be on, you want it to have been executed in the past.

Long story short, neither scripts nor scenes will be usable in scenes in the near future.

@Santobert thank you for your quick explanation.
Will it be possible in the near future to use a "main" script to run a bunch of other scripts in parrallel?

@starkillerOG I'm not aware of anybody working on it.

@Santobert thanks for your help, for now I reverted to 0.101.3, I will start working on converting all my scenes to scripts.

Long story short, neither scripts nor scenes will be usable in scenes in the near future.

That is disappointing.

I'm gonna close this for now. We have recently discussed this issue and decided to stick to the current behaviour for reasons of simplicity and usability. There are still automations and scripts to activate scripts and scenes.

This did work until 0.102, even if it was not intended. Dropping support for this is fine but as far as I can tell there was no warning in the release notes. This has broken a bunch of scenes that I use and requires some significant rework, it would have been nice to know this before upgrading. Is there a reason this was not included as a breaking change in the release notes?

We didn't realize this would be impacted.

I'm open for a PR to update the release notes and add it, or to have a PR add the functionality back, but print a deprecation warning. We did that for a couple of light options too.

HI Balloob,
one of these light options was to possibly (re-)add the now lost 'transition' (in the scene itself) to the scene.turn_on service. Is this being developed yet? Tried to find some pointers to that end here and on the community, even created a FR to be sure, but all is silent...

thanks and let me know if we can add to the development if it.

Yikes, this was an unexpected break for me as well. What is the recommended way to handle things like this? Do I need to spin up scripts to call multiple scenes?

I too got bit by this change, I had two scripts that would fire in several scenes. These scripts turned a light on/off via a SSH script. I ended up creating a "template light" and added this to the scenes, it worked!

Example:

light:
  - platform: template
    lights:
      dashboard_light:
        friendly_name: "Dashboard Light"
        turn_on:
          service: script.dashboard_bright
        turn_off:
          service: script.dashboard_dim

This broke a lot of my automations that involves scenes. Would have been nice to list this as a major breaking change in the docs!!

Same here .. should we wait for this to get fixed or this is now a permanent change?

This breaks a whole load of scenes for me too. Big shame too, as it helps get rid of a lot of duplication of config, and now mutliple scenes which are largely the same but with a few minor differences.

@martinlong1978 Just create a bunch of scenes and activate them using a script. The only change is, that you have to use scripts to activate scenes.

Big +1 here. I had my scenes configured following DRY Principle.


Basic Example (1):

  • Scene: Living Room Lights On --> configures all living room group lights to their state.
  • Scene: Living Room Climate On --> configures living room to on and the right temperature
  • Scene: Living Room On --> set up scenes for living room lights and climate on
    /
  • Scene: Bedroom Lights On --> configures all bedroom group lights to their state.
  • Scene: Bedroom Climate On --> configures bedroom to on and the right temperature
  • Scene: Bedroom On --> set up scenes for bedroom lights and climate on.
    /
  • Scene: Going to bed --> scenes bedroom ON, living room OFF
  • Scene: Arrive home --> living room ON + other state changes

This way if any detail changes (e.g. I want a different colour for all scenes, or a different temperature used across), I do not need to change 10 different scenes, I only need to change one.


Basic Example (2):

I have a set up of light colours for events (Xmas, Halloween, etc). There are some lights which, regardless of the event, will always be the same colour. The others will change depending on the event.

The way this was done:
1) Set up a base light scenes with the light colours that never changes.
2) Set up the event scene that calls the base light scene + the event colour changes.

This way I avoid having to repeat the same base light configuration over and over for all the scenes. I configure it once and I can use it.


I have solved this now by moving to scripts, but that felt a bit unnecessary as scenes within scenes was quite nice.

ooof.

I've been chasing my tail for the last few months trying to find out why my scripts weren't working anymore. I asked around in the discord channel and everyone told me it should work...

So yeah.

+1 for scenes being DRY
+1 for "damn, wish this was in release notes"

Just wasted two days trying to troubleshoot this.. I have a bunch of scripts defined in scenes. Not cool :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheZoker picture TheZoker  路  3Comments

aweb-01 picture aweb-01  路  3Comments

moskovskiy82 picture moskovskiy82  路  3Comments

MartinHjelmare picture MartinHjelmare  路  3Comments

piitaya picture piitaya  路  3Comments