Pool auto filtration based on temperature

thanks for this .

a different flavor to achieve the same thing

{{ (as_timestamp( ( strptime(states('input_datetime.pump_auto_start'), '%H:%M:%S')) + timedelta( hours = states('sensor.auto_cycle_duration')|float(1) )))| timestamp_custom("%H:%M:%S") }}

Capture d’écran 2022-05-16 104049

Hello Froggy.

Thanks for the automation.
I think I have a problem or a bug

My autofiltration start at 8:00 am ( j:0) , during the day my temperature of my pool increase at 30 or 31 degres.
Autofiltration stop at : 02:18 ( j:+1).
autofiltration does not stop at 02:18.

indeed,
i did not anticipated this behaviour as my filtration stop before the end of the day.
i have to find an other way than " count uptime by day"
maybe by reseting a specific counter instead of couting by day.
i will think of something , try it on my side and update the github

For Summer :
maybe :
a first automation during off-peak hours
a second automation during the day
total filtration = 1+2

For winter:
a first automation during off-peak hours
a second automation during the day

total filtration = 1+2

i have updated and upgraded the github
let say it’s now V2

  • upgrades:

    • abacus mode added ( thanks to dom rem81 )
    • simplier lovelace card
  • fixed:

    • the stop automation is now triggered by two duration sensors ( pump duration on current day or pomp duration since last trigger ) in order to survives un filtration cycle on two days

Salut,
merci pour le tuto , j’ai une question ( car je dĂ©bute avec HA ) et j’aimerai comprendre : sur mon dashboard je dois aussi changer l’entitĂ© nommĂ©e dummy pool par mon entitĂ© de tempĂ©rature de l’eau?
et ensuite je me suis mis en mode standard , j’arrive pas Ă  interprĂ©ter le temps de filtration prĂ©vu etc :slight_smile:
merci d’avance :slight_smile:

:slight_smile:

hi,
i’m not sure to understand your problem ,
and i will switch to english so it can maybe help some other people

the pool_dummy.yaml is just here to test without using your own switch and sensor
you can add en entity cards with 2 entity :
switch.tz3000_pompe_piscine and input_number.dummy_temp_piscine
you can check that the switch.tz3000_pompe_piscine will start at 13:00
play with the input_number.dummy_temp_piscine to set a virtual temperature et check at what time it will stop

to make it works , you need to :

  • delete the file pool_dummy.yaml
  • edit the file pool.yaml and lovelace-card.yaml (with a text editor or directly in HA with the file editor add-on)
  • replace all occurrences of sensor.pool_water_kalman by your water pool temperature sensor
  • replace all occurrences of switch.tz3000_pompe_piscine by your pool pump switch
  • restart HA

the lovelace card should now display your pool temp sensor
you just have to set the auto start time , and that’s all

and to answser your second question, here is a mode detailed explanation

@froggy.laurent bonjour, est-ce que tu pense pourvoir rendre compatible avec HACS pour les mise a jour ?

ton projet a bien avancer tres bon travail

i don’t think so.

i don’t use hacs (i use only 3 or 4 components), i prefer to update manually each components when it’s broken by a core update

ok i try this night :slight_smile:

hey ,

it’s ok now :

I saw that you calculated the standard according to the graph of the following site: Le programmateur de pompe piscine: régler et optimiser l'horloge

The filtration time of 14h seems huge to me, because I have a small pool 
 but hey if these are the “official” times :slight_smile:

:+1:

yes the standard mode is quite “conservative” , it comes from oklyn blog and it’s a bit more than what my pool dealer told me.
i used the abacus mode which seems to be more optimised

also , normally, the filtration duration is not relative to the size of the pool.
The pump power should be sized in accordance with the rule :
the total volume of the pool should be filtered in 4h

so , whatever the size of the pool, the temperature/filtration duration ratio should be the same

Hi ,

Thanks for your tool that work great and was easy to setup. Is-it possible to program a pause of one hour of the pump ?

Thanks again.

hi,
a simple way to do that would be to add a script and to launch it via a button

alias: pause filtration
sequence:
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.tz3000_pompe_piscine
  - delay:
      hours: 1
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.tz3000_pompe_piscine
mode: single
1 Like

Just to say thank you !
Very efficient and easy integration which can be modified easily.

1 Like

Just to mention that the end of filtration should not be
now
but
state_attr('automation.pool_filtration_cycle_start', 'last_triggered')

Again, thank you

hi,
i’m not sure to understand what you mean .
do you talk about

         {{ (( now().timestamp() - as_timestamp(state_attr('automation.pool_filtration_cycle_start','last_triggered')) ) / 3600 )
           | round(2) }}

at line 70-71 in pool.yaml ?

Hi !

No, I am sorry, I was’nt very clear. It is at line 42 in pool.yaml.

| **Auto filtration will stop at**: | *{{(as_timestamp(now()+
timedelta( hours =
states('sensor.auto_cycle_duration_abacus')|float(1) -
states('sensor.pompe_piscine_on_today')|float(1)|float(1))))|
timestamp_custom("%H:%M:%S")}}* |

This does not give the end of the filtration as it gives : now + duration - piscine_on_today.
Maybe this is not right as I am really a newbee in HA. But it does not give the good time

In fact I had to change another information which was correct then :slight_smile:

| **ArrĂȘt Ă  :**      |
 *{{(as_timestamp(state_attr('automation.pool_filtration_cycle_start',
'last_triggered')+ timedelta( hours =
states('sensor.pompe_piscine_on_today')|float(1)|float(1))))|
timestamp_custom("%H:%M")}}* |

which can be simplified.
Sorry for the trouble ! And thank you again.

thanks for the explanation, i’m always happy to correct mistakes and improve my code.

the markdowm code display the correct end time for me, i can’t reproduce the issue you are describing

the filtration started at 9:pm , it’s 3hours long, and will last at noon.

here is a test of your template , it’s say that the stop time is in the past

Thank you for this discussion



As you can see, as I put your template at the end, the filtration ends at 23:31:28.
In mine, which is just above, it ends at (arrĂȘt Ă  ) 1:36, which seems to be correct

I am certainly missing something but I do not understand

Perhaps due tu my starting time ?