how about an extra parameter to specify the referencce point? for example if you want every 2 days, specify starting from say 1st of June 2022. Then after a restart it will read the starting point and it will know where it is.
sorry for the silence! I have managed to burn the water valve (my mistake) and now I am waiting for a replacement and I will test out the proposed solutions!
I may have done something wrong because the automations didn’t start with your implementation. Do you mind looking at the following settings and see what is wrong?
I would never suggest to do what you have done (i.e have one automation turn on/off other automations). My posted example turns a switch on/off.
There’s no reason to turn on/off the two automations. Just add the Template Condition, that I had suggested two months ago, to each automation so that it will execute its actions every two days.
(In addition, as paddy0174 already mentioned, your example misspells iif)
ok I am changing things and following your advice. I have made a small example with your automation but I get an error when I test the condition. I have copied and pasted your automation and when I switch to the visual editor in the condition section I get the test button. When I press it I get the following error:
template value should be a string for dictionary value @ data['value_template']. Got None
I copy and paste your entire automation in a new automation using the yaml editing method (I cannot create it using the UI editor ) and I press save and it changes to what I have and I get the error I mentioned.
What should I do?
Maybe one (you?) should make a thread about that, so we can easily link to this as an explanation? Maybe something that could get pinned on top? (@petro ?)
Nonetheless it’s annoying, because people loose their faith. Even I had that moment a few days ago, it took me a few seconds before realizing it’s the bug - and not me!
I works! It turned on today when it was supposed to! Tomorrow the condition will be false and it will not turn on. I will create a few helpers to set the start times and number of days easier. I assume this is possible no?