@jegember wrote:
Hi guys, I’m stuck a bit with a date calculation. I’ve got a hot water circulation script, that circulatest the water in the morning (before wake up). I wanted to add a condition that checks if there was somebody in the house after 8:00PM Yesterday or e.g. left for vacation and no circulation is needed in the morning.
So I wanted to do something like: “If there was a movement after 8:00PM Yesterday then circulate, else don’t”.
I’m struggling with getting the time for 8:00PM Yesterday. I managed to extract the day for yesterday, but I do not really know how to build up (concatenate?) the whole date&time from this:
{{ (as_timestamp(now()) - (24*3600)) | timestamp_custom('%d', True) }}
Thank you very much in advance!
Posts: 3
Participants: 2