That makes more sense
Edit: just saw the other reply from @Burningstone about transitions, scriptsā¦
Huh. I never would have even thought to use scenes within scenes. Clever. Guess I never really used them extensively enough to even consider it. Any idea if that is the only limitation now or have they changed anything else? Honestly, I donāt see myself using them for much other than lighting anytime soon. Even then itās limited to when I need to store current lighting to restore after some event that affects the lighting.
I used to use Philās light store python script (and still do in some places) to accomplish this but I noticed the new scene.create service so I thought Iād try it out. It works so I left it. Hereās one example I have for the automation when my garage door opens. arrive_home_lights is actually a light group that includes the lights in my garage, my side entrance, porch light etc.
- service: scene.create
data_template:
scene_id: garage_door_lights
entities:
light.arrive_home_lights:
state: "{{ states('light.arrive_home_lights') }}"
brightness: "{{ state_attr('light.arrive_home_lights','brightness') }}"
- service: script.turn_light_on
data_template:
light_name: 'garage_lights'
brightness: 30
ignore_user_state: 'true'
- wait_template: "{{ is_state('sensor.side_entrance_motion','off') }}"
timeout: '1:00:00'
continue_on_timeout: true
- delay: '0:05:00'
- service: scene.turn_on
entity_id: scene.garage_door_lights
Iām generally a fan of Phil but actually I donāt use any of his components (Iām a liar, I use life360 and virtually every occupancy tip heās ever posted because I donāt use āpersonā) but not come across that. Hmmm interesting, Iāll look at that later.
Of the above I donāt recognise the bit you I (itās getting late) quoted (feel free to explain)
All the rest of it though could easily be done in a script soā¦ What am I missing ? (its usually big and grey with a trunk)
Absolutely nothing! Different strokes for different folks! I just like exploring all the different options.
Itās a parameter for a script that prevents automation from changing entities if the occupant has recently used it. So say if I turn on a light in the living room no automatons will change that lightās state (until the associated timer runs out) unless ignore_user_state was set to true (for example the smoke alarm - the lights turn on no matter what the user state is). If youāre interested I can put into a gist for you.
I think this is a perfect example of a use case for the ānewā scenes. I would use it the same way if I would use scenes
I think all of it can be done with scripts, itās just āeasierā with scenes.
Here is a good explanation I found on Github on how scenes work and why you canāt call scripts/scenes from them:
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 areon
oroff
indeed, but this is only a momentary state and you donāt want the script to beon
, 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.
@jazzyisj Jason (reply is to burning but you first) but I understood that scenes were one shots, so the point is moot.
I always want things how I set them so if I want them that way I set them that way.
I just donāt see the point in scenes.
Burning, thanks for that, the best explanation Iāve ever āseenā (ha ha) So Iāll stick with scripts (never used a scene in my life - though maybe if I was doing theatre ??? (but then Iād have access to much better hardware)
Thank you both for the education.
Not sure if Iām high jacking this but Iām also planning to implement something similar to this, one difference would be i have a zigbee wall switch controlling a WiZ light. I havenāt wire them up, in process of renovations.
Iām thinking the tracker would trigger and check the conditions if to turn on the zigbee switch, though then (where Iām stuck) need to wait for the WiZ light to come online and connect, then switch the the appropriate scene. Or am i wrong to assume HA will only fire off to set a scene once regardless if device is online, and ends the automation. So if my WiZ was slow in connecting, it basically wont change to appropriate scene?
Why do you want to have a zigbee switch between the light? Why not direclty connect the light to the power?
Cause I would like to be able to turn lights on/off via physical switches, and with my mobile without having to walk to the switch.