Sorry,
Not got this. : -
“is_state(” ---- is asking if the state of this entity is “this possible state”
“(‘script.’” ---- so you are looking at ony “script.” objects
~ ---- looks like a string substution charachter to me so it then only matches with objects ending in →
… “trigger.to_state.name” (though as I write this it looks more like -->)
where the “trigger.to_state.name” is →
" ‘_turn_on’ " ???
but is " ‘off’ "
Nope, way over my head …
trigger.to_state.name is either the friendly_name, or the object_id (if it has no friendly_name), of the entity that caused the automation to trigger. So, e.g., 'Dish', or 'dish'.
Next the string concatenation operators (~) concatenate 'script.', the value of trigger.to_state.name, and '_turn_on'. So, e.g., 'script.dish_turn_on'.
Next the is_state() function is called to see if that entity is 'off'. So it’s checking if the script of interest is off, which means it’s not running.
Okay, I now understand that and I’ve made a note of it but ask me in a week’s time and I’ll only have a vague recollection (so I refer to my notes).
This depends upon a close correlation between entity names (be it id or friendly) and the associated script. BUT if the aim is to get the trigger to provide the necessary ‘par’ ‘ts to be cons’ ‘idered’ then that is a minor irritation.
Thanks for the explanation, it really does help.
I used to use concatenate() in lotus 123 macros, but that was a while ago now ! : - )))