Help with a Greater then Automation

Hi all,

I wast trying to figure out how to set a automation for my DIY pool solar heater.

I basically set up my pool and ran a extra filter water out that runs through a irrigation hose into a box i built mounted to my roof and back down to my pool. before the “warmed” water goes back into my pool, i have a irrigation valve on a sonoff switch that enables me to turn on/off the “warm” water from going into my pool. I also have 2 sonoff temperature probes one that measures the “cold” pool water and one that measures the “warm” water the comes out of the return. I had to place this probe at the end of the irrigation tube because I couldn’t figure out a way to place the probe in the line before the shutoff valve without leaking ( this would have been a better option so I could get a constant read on the “warm” water. So I guess ill have to have the “warm” water occasionally run through the valve to check the temperature, but only run if the warm water temp is greater then the “cold” pool water.

my entities are:

sensor.sonoff_10006d38f0_temperature (Cold pool water sensor)
sensor.sonoff_10006d3901_temperature (Warm water sensor)
switch.sonoff_10006d3901 (Switch for warm water shut off valve)

Last year I did do something like this but without the probes, I think this one will work much better (hopefully fingerscrossed)

- id: pump
 alias: Pump
  trigger:
    platform: state
    entity_id: sun.sun
  action:
    service_template: >
    entity_id: switch.sonoff_10006d3901

I know there was more to this, but I can’t remember. Im sorry if this doesn’t makes sense, Im kinda out of it today from finishing up this project on the pool in the hot sun.

Any ideas would be appreciated!

thanks again
Corey

You seem to be triggering on the sun.sun changing state? That is not what you described.

I know, it’s a different setup this year.

I would think also using above_horizon as a condition would probably be a good way to start because if I need to check the temperature from the valve I know it wouldn’t be beneficial to compare temps in the evening.

I assume you have a decent basic understanding of writing automations so it would probably work best for others to help you if you get a basic automation coded with all of the desired triggers, conditions and actions layed out correctly along with all of the services/entity_id’s. then we can help you troubleshoot where it isn’t working correctly.

Yes, I have a good enough understanding of automations . I will get something together. I appreciate your willingness to help once I get my logic down.

I had a issue with my Temperature sensor, I want to place it on the pressure side of the shutoff valve so I can get a true reading before opening the valve but I haven’t figured out how to get it in the line without springing a leak. Once I get that figured out I’ll write up something. The good news is my diy solar heater seems to work pretty good! It will be interesting to see how much it raises the water temperature of my pool when we finally get consistent summer weather.

Thanks guys!