This is created in Gui.
For some reason I do not understand, this input_boolean is switched on and directly switched off again. Without delay. What is wrong with this code?
Trigger: input_boolean.motion_buiten_verzamel = on
condition: input_boolean.sound_on (this is a switch to turns the sound on/off)
start a script that plays a sound on a bluetooth speaker.
If the trigger is just the ´motion sensor group´ then the sound is played too many times.
I want to create a delay by using an input_boolean that stays on for a few seconds.
I just discovered the trace-timeline! That is wonderful!
I noticed that the delay is working, so I increased the time, and now it works better.
With ‘for: seconds: 7’ I will miss some fast movements like a riding bike. If I then use an input_boolean the movement does trigger and play a sound, but just once. I hope. I will see if this is working better.
Thanks all!
Because this.attributes. sounds like a: sftp://your-username@ip-address construction to me. As I said I’m not very familiar with home assistant yet.
I will try this out.
Variable this is the state object of the automation. State objects also contain context data which can be used to identify the user that caused a script or automation to execute.
In this case, this.attributes.last_triggered represents the last time the automation was triggered. The automation is triggered by the group entity so it represents the last time the group changed state and triggered the automation.