Hi everybody, I would like to retrieve the defined value offset in trigger and use it as a transition value in action. Here is what I have defined in my automation
It’s a timedelta object and total_seconds() is the correct method. Perhaps it produces a float and transition only accepts integer? Try converting the result to integer with the int filter.
Convenience. If the user later chooses to change the offset value, there’s no need to modify anything in the template, because it refers to trigger.offset.
I was wrong about float/integer. Transition accepts a float value. You could try re-arranging it like this but I doubt it’s the cause of the problem:
Thanks for your help guy’s, placing entity_id after data_template doesn’t change anything. In fact, the value obtained is a negative value, it should be possible to indicate that it is a positive value. I guess a Python function must exist for that.