Deactivate means turning off all entities in the scene.
While here why is the service call scene.turn_on
instead of scene.activate
?
Deactivate means turning off all entities in the scene.
While here why is the service call scene.turn_on
instead of scene.activate
?
Scenes don’t have a state. They are collections of actions (services) translated from your list of entities and wanted states.
scene.activate
would be more logical name that scene.turn_on
(especially when we turn off devices with this)
I’m not sure if this was the idea of this topic but it would be really cool to have some kind of “deactivation”. Right now you can save state of all related entities to temporary scene and then restore from there but it has many problems:
Scene deactivate is exactly what this is about as the title says. When a scene is deactivated all entities in the scene would turn “off”. Off in quotes since, for example, media would stop.
They are stateless. Scene apply a pre-defined setting to entities or devices. Unsetting them would… ?
I get the request, but it is impossible to implement (as a matter of fact, originally, scenes had such a design and it doesn’t work).
They are saying scene.deactivate
would parse the list of entities in the scene and switch them off (or stop or close them). Rather than setting them to the predefined state.
So that means this has nothing to do with scenes?
How so?
The scene provides the list of entities.
scene.turn_on
translates the wanted states of the listed entities to services to achieve these states.
scene.turn_off
calls the "off’ services for the listed entities.
They don’t. They provide a restorable state.
I guess we could make it possible to query the possible list of entities affected by it.
turn_on
and turn_off
for scenes are legacy / left over from a historical perspective, but not actually a thing. It is mainly still around because of history.
Being able to get the list of entities in a scene would be a great addition. It’s easy enough to script a turn off however you want if the entities are available.
Scene.deactivate initially sounds useful, but it really isn’t.
A scene may, say, set your lights to 20% dim and play some soft romantic music. What is the definition of deactivate in that case? Turn the lights to 0%, 100%, 21%, a random level?. Play some AC/DC? At a simpler level, what is the opposite of a given ‘state’?
AC/DC would be cool Jokes aside, how do you let you scene play a sound? There is no such sensor with state as sound or is it?
You can set the state and attributes of your media_player.
Since we’re playing WTH… WTH isn’t it useful? You can’t say it isn’t useful. It may not be useful to you. It is useful to me.
I use a scene when I sit down in the family room. When I go to bed I’d like to turn off all the lights in the family room. I’m not thinking this new feature is going to solve everyone’s problem but it simplifies not having to group the same three lights together so that I turn them off.
Seriously this is not a big deal for me. I’m WTHing something that simplifies my config.
You can simply make a second scene for switching everything off. Or would you just like to restore everything to the state they was before you activated your scene first?
Yes I could define a second scene. As a developer I can’t easily vacate the DRY principle, which is the real reason for this WTH. Every time I have to define the same list of entities more than once I cringe a little. Which is why I’d be happy with simply being able to get the list of entities that a scene uses.
Like looking at the yaml?
Pretty sure he means from the scene entity
Wow. I thought WTH was to explore in curiosity what is possible. Since that doesn’t seem to be the spirit, I’m out.
I think you pressed a button with that whole scene thing. For me this is one of the most useless default features in HA for several reasons:
So the usage is so limited, I really have no valid use-case next to “scene tv on/off” with power plugs and basic lights being turned on and off. But maybe it’s just me not understanding the true power of scenes