Pointers for starting pool automation

Very new to HA, and I’m looking for some pointers as to where to start with automating my swimming pool operation. Here’s an overview of the equipment:

1 filter pump on a Tp-link smart switch
1 chlorinator on a Tp-link smart switch
1 sweep on a Tp-link smart switch
Valve actuators that are controlled from a Sonoff wifi relay card.
A spill-over spa. In normal operation, the filter returns to pool and spa. When you want to heat and use the spa, the actuators change the flow so the pump returns only to the spa and “sucks” only from the spa.
A heat pump heater.

Starting Point
I need to have 4 different schedules for equipment operation - summer day, summer night, winter day and winter night. Each of these schedules should run the filter, chlorinator and sweep at appropriate times, but only if the spa hasn’t been called for. I’m thinking I could have normal HA automations for each of these, which would result in 12 automations (one for each piece of equipment in each of the schedules). The automations could check whether they should be running at all via a “switch” condition that governs day or night, and could also check whether the spa has been called for, in which case it shouldn’t run either - turning the spa on will itself run the filter and set the actuators.

The reason for day or night runs is because I want to run during the day when my solar should be covering the electricity consumption, and at night otherwise. So I could set the switch manually every night based on the weather forecast for the next day. Of course, I’d ultimately want to automate this, but first things first…

It strikes me that this is all a bit cumbersome, so I’d love to hear suggestions for improving it. Is there anything that would make setting up the schedules easier than creating 12 individual automations?

Down The Line
When the spa is called for, the actuators move the valves accordingly. When the spa is turned off, it would be nice to go back to any schedule that would normally be running at that time, turning on the equipment that would normally be on at that instant. Not at all sure how to do this.

I also have another Sonoff relay that turns the heater on and off, and a Blueriiot Blue Connect temperature and water analyser. I’d like to use the temperature reading to automatically turn off the heater when the pool reaches a certain temperature, and that temperature will be different depending on whether the spa is running. I think this should be possible with normal automations, but I’d probably like to have nice temperature sliders in the UI somewhere so people can set their desired temperature.

As I said, new to all this, so I’d be eternally grateful if I could get some general ideas on where to start, and any components that could help me.

Write out all twelve of the states.
There might be some common items or logical ways to group them.
Do you have a HA entry for your solar output? (might be better than day and night and could account for cloud cover)
What temperature range do you want to keep things, what changes from day & night & summer & winter?

Thanks very much for the reply.

Yes, I can see my solar output, but I want to run at night if tomorrow’s weather looks unfavourable for running the system on solar. In that case, I’d rather run at night to take advantage of off-peak electricity rates. So I’m thinking of looking at tomorrow’s forecast at around 10PM each night (manually at first, then automatically once I’ve worked out how to do that).

In summer/spring/autumn I run the pool heater, in winter I don’t. I need to run the pool heater for long periods each day, to keep the water at the temperature my family likes it (29C)! That means I can’t really switch it on and off according to the current weather. So it’s either 8 hours at night or 8 hours during the day. It will, of course, be switched off whenever the water gets up to temp, which I plan to do automatically, once I’ve found a way to put a temperature probe into the piping to measure the temp of water returning from the pool or spa.

To date, I’ve discovered the scheduler-card component, which makes setting up lots of on and off schedules fairly painless - you just end up with a lot of them. That’s 3 on and 3 off schedules to control each piece of equipment in each of the 4 season/day/night scenarios. So 24 schedules in all. Just seems messy! Yes, I might be able to make some of the schedules overlap between scenarios to cut down on the sheer number. The card does have condition functionality, so I could make the schedules run only when an appropriate day/night “switch” is set.

Any further thoughts most welcome…

Let’s start with one component first then.
How about the filter?
When do you want the filter to run? Certain hours, pool in use, when heater is running?

Sometimes it is better to just get started and make one automation and then build on to it. When you name your automations I would start the name off with something like “pool_” so pool_heater, pool_filter, pool_lighting, pool_defensive_perimeter, pool_spa_use.
If you name the automation like this then they will be easier to spot and will be grouped together.

For the filter, it would run for different periods in winter than in summer, sometimes during the day if solar will be generating, and sometimes at night otherwise. So 4 different schedules, depending on 2 different “switches”. I’m pretty comfortable putting all these into individual automatons, each with conditions that depend on a couple of input_booleans. If that’s the best way to do this, then that’s fine. I was just wondering whether there was a neater way. The scheduler-card does help a lot - makes all the schedules more visual, and also lets me have conditions.

Is there something that will easily let me see the forecast for tomorrow, and flip the day/night run switch according to, probably, cloud cover?

Thanks for sticking with me…