I am trying to make some light dim after x seconds, and if no movements within a given timespan, the light should turn off completely.
I am trying to avoid having a script pr. room, so therefore, I am trying to send some variables from an automation to the script. However, I am stuck in my last condition, where I check, if there has still not been any movement in the room for x seconds.
Aaaah yes ofc! Did not think about that one. That might be a stupid way of doing it then.
But I guess, the script can just be put directly into the automations action, since that is basically a script.
And I have an automation for listening for an off state on the binary anyway.
I’ll look into that.
Thanks for the feedback
so your syntax errors are because you are trying to place variables into strings and that’s not possible the way you are handling it. Putting bracket’s around a variable will not work and have it automatically place said variable into the string. You can put variables in strings but the strings themselves need a specific format and you need to call the format function: