Thanks once I update HA I was able to get everything working. Appreciate you help and pertinence.
1 Like
i know, 2 years old, but perhaps u can share your finally solution. thx
configuration yaml:
template:
- trigger:
- platform: numeric_state
entity_id: sensor.pool_fc
below: 5
for: '00:10:00'
- platform: numeric_state
entity_id: sensor.pool_fc
above: 5
for: '00:10:00'
- platform: event
event_type: event_template_reloaded
binary_sensor:
- name: Low Chlorine
state: '{{ states("sensor.pool_fc") | float <= 4 }}'
And my automation that check for ppm <=6ppm. I found that given the inaccuracies of determining CL ppm, dosing at 6ppm works better. I also have converted to a salt pool and do not use any this anymore. I HIGHLY recommend going to salt. I have not had to add chemicals this year once I got the pool opened and stable.
- id: '1631381430616'
alias: Pool Auto Chlorinator
trigger:
- platform: time
at: 05:20:00
- platform: time
at: 07:15:00
- platform: time
at: 09:15:00
- platform: time
at: '15:20:00'
- platform: time
at: '17:15:00'
- platform: time
at: '19:15:00'
condition:
- condition: template
value_template: '{{ is_state(''binary_sensor.low_chlorine'', ''on'') }}'
- condition: state
entity_id: switch.sonoff_pool_pump
state: 'on'
for:
hours: 0
minutes: 15
seconds: 0
action:
- repeat:
while:
- condition: template
value_template: '{{ states(''sensor.pool_fc'') | float <= 6 }}'
- condition: template
value_template: '{{ repeat.index <= 6 }}'
sequence:
- service: mqtt.publish
data:
topic: Pool
payload: orp:on:144
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
mode: restart
trace:
stored_traces: 30
1 Like