im not sure if the template like this is enough? do I need to set “true” some where, so it knows when to trigger?
or is this always only trigger when its true?
Sorry you’re correct, I found that I need a notify around 8 o clock, so the I need a trigger at time.
and a condition that it only fire’s when its true
It is my understanding that all attributes used in a template will always return the type that it thinks that it is.
So a string value ‘17’ will automatically be returned as an integer because it looks like an integer. And a string ‘True’ or ‘true’ should return a boolean true because it looks like a boolean.
It was changed a few releases back to work that way (to some small amount of confusion) but it doesn’t seem to be foolproof.
Not doubting you for a second, but if that’s the case why are all states strings?
My understanding was that states are ‘normalised’ to strings, but attributes remain their native types - therefore 17 could be an int or a string dependant on the component that’s generating them.
But that said, I have no idea where I got that idea from, so I’ll likewise happily believe your understanding too
but here is another discussion which shows that it doesn’t necessarily depend on the actual type in the attribute (or even the state) but it depends on the conversion of the template into whichever type the renderer thinks that the type should be (in that example it converted the state string ‘None’ into the native type None so the state of the new entity was unknown as a result of the template).
So yes, attributes keep their types but the ultimate returned type could end up being a different type depending on the way the template renders it.
That said, the returned type of that template should be a boolean even if the attribute was a string (because it looks like a boolean) but it hasn’t always worked out like that.
I understand everything you said, but that is to do with the output of templates and the template I did returns a boolean regardless, that wasn’t the point/question I was making/asking, and therefore not what I thought you were replying to, and therefore not what I was replying to etc.
The point I was making was that the attribute is_collection_date_today might be a boolean, but it might be a string, so I guessed it was boolean but it might need quotes around it to make the boolean output of the template correct.