I have an automation which I want to run based on two different humidity ranges, each of which are based on the time of year. Would you guys opt to having two separate automations with the date as a condition, or one automation with an If/Else action that checks for the date range to be true or false? Here's how I'm checking the date using the Time and Date integration:
{% set month = states('sensor.date')[5:7] | int %} {{ month >= 9 or month <= 2 }}
This is currently a condition to run the automation if it's between September and February and then I can change it to be
{% set month = states('sensor.date')[5:7] | int %} {{ month >= 3 and month <= 8 }} for the spring/summer period.
#Two separate automations, or combine into one?
1 messages ยท Page 1 of 1 (latest)
Personally I would make a single automation but make the trigger limits that you change be triggered template sensors that update every day at midnight
I had a feeling you were using seasons. You should take a look at the Season integration as it does all the calculations for you.
of course there's an easier integration i didn't know about ๐ญ
lol this is why I had you make the post ๐
I use the season sensor in a lot of spots... SUPER easy instead of figuring out dates and such.
for sure
thanks for the suggestion, I'll tinker around with it and see. you'd still use it as a condition in two separate automations or both in one?
I agree with @fierce current ... Make it one.
But really, it doesn't matter all that much. It's just how complicated or simple you want to make things.