Hi All, I have just tried to create a new packaged automation but it isn’t working when I try to test it. Since the date state isn’t going to change and therefore will not trigger the automation, I used the manual trigger option from the GUI in the hope that the rest of the automation would then work once the current time met that of the input_datetime, but it didn’t. Can someone please tell me what I have wrong here? I also don’t know if the date trigger is quite right since I haven’t tested that yet.
alarm_off_for_rent_inspection.yaml (in packages folder)
The templates are only evaluated when the entities inside change, and now() is excluded from that list, to avoid triggering every fraction of a second.
This makes the state of the sun.sun entity evaluated by the template engine, but ignored because it’s in a comment. That will result in your template being evaluated every minute.
Of course, given that you’re only checking the date, I’d use a time trigger for (say) 02:00 and move that check to a condition.
good idea. I guess I was mistaken in thinking that the template would only evaluate on the change from one day to the next. Is there not a way to do that? (perhaps without a template?) I was trying to use the event of a date change to check if the date matches that of the input_datetime and then wait until the corresponding time to complete the action
I will likely set up the calender solution as the final, however in the meantime I’m trying to get it to work using a date condition but nothing i try passes the config checker. how can i make this work? help please
thanks for that, I tried it but it still isn’t going through with the action.
Looking at the town entities, the input_datetime returns a format 06:18:00 whereas the sensor.time is 06:18 How would I need to change the template to accommodate this? Sorry but my knowledge / skill with templates is extremely limited
well you aren’t using sensor.time, you are using now().date(). Also, I assume you are using the input_datetime that returns a date. So What is the format of the dates?