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?
Iāve had some times where even tho the template rendered as ātrueā I still needed to make it explicitly return a boolean ātrueā in the template.
I canāt explain why it happens intermittently I just know that it does.
So if the above doesnāt work for some reason you could use this:
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.