Create script button > create new script > add building block > choose
In option 1 add a condition > entity > state
Choose your entities and set the state to ON.
Then in your action Add action button > Type “light” and select turn On action. Set your light up as required.
Then you can do it again for another choose and set your light up differently.
Save.
Now add that script in Lights - Switches - Scenes - Scripts. Now when your light turns ON and you entity is in the state then it will turn on the lights to your preference.
If you want it to change to a different preference when your lights are ON then don’t add a Scenes & Scripts - Toggle Helper in but you will need to create a scene with all your lights used in your script with them OFF and add that scene into Scenes - Scripts To Turn OFF
There are many ways to do this and if you need help with scenes or scripts then you could create another topic on this forum as there are heaps of people that will help you.
So if you would like this to happen when the automation turns OFF your light you will need to run a script. The script will set the lights to 50% and then go OFF. There is no direct setting in the blueprint for this and is why you will need to make a script.
Then to that state template you would add your condition for night lights. That way if no one is home and your night lights condition is OFF the bypass will be ON but if the night light condition is ON then your Bypass will be OFF.
Sorry I don’t know what condition your have for night lights so I can’t do the code example for you. Hopefully you will know what to do.
thank you @Blacky
thanks for the pointer to the bypass.
Using the bypass for it is just not too obvious, especially since the explicit thing is available for the the nightlights. But for those overall less options are needed.
Let me check the bypass option - I have a boolean is_not_nighttime
In ZigbeeMqtt → settings → home assistant integration, enable the legacy action sensors, although thats fixed that specific issue, i’m still having trouble with this blueprint, still fiddling and changing settings since the last zigbee2mqtt update.
Yes the bypass will disable the whole automation so you will have to make sure that if you would like your night lights to be active your will also need to make sure you turn OFF your bypass when this happens.
Looks like there may be an issue with z2m, V2. Thanks @lukas423 and welcome to the community. @serville may have a solution.
The problem in your trace line is with your ambient… probably your sensor. Maybe it is not communicating correctly. If you disable this option it should work then you will have to see what happening with your sensor.
I wouldn’t think so… but I never update on HA202?.1 I always wait for the second release or even the third depending on if I would use any of the new features. So I am yet to update and test it out.
Normally motion = PIR sensor. Like the ones that has been around for decades. They act fast so the automation can respond fast but may not detect you if you sit still.
Occupancy = Normally a mmWave sensor. They act slower at the start but are good at detecting movement even if you are still.
If we use them both then you have fast reaction and good detection.
If this is what your sensor is then what you can do is group your occupancy and motion and use the group as the trigger so you have the best of both. A link in the blueprint next to the trigger input shows you how to group them.
Thanks for the reply and I will try this out. How would this handle say the fact I’m sitting in the desk zone and someone else walks into the other zone? I don’t want it want it to change to cold white if that’s case
Because we are using your Desk Zone to activate night lights, whenever it is ON night lights will be applied. Then we use all of your zones as the trigger to turn the lights ON. It is critical you select If lights are ON, adjust the lights when crossing over for it to work.
I don’t think that enabling legacy features back is a solution. It’s a mere workaround, because the core problem is still there. There will be only struggle maintaining it down the road.
@Blacky, do you think it would be possible to incorporate the device triggers in the blueprint please?