I came across this when I was using my old floating pool monitor (it didn’t last long).
- platform: template
sensors:
pool_free_chlorine:
value_template: "{{ ( 0.23 * (1 + 0 / 100 ) * ( 14 - states('sensor.pool_monitor_ph')|float(0.0)) ** ( 1 / (400 - states('sensor.pool_monitor_oxidation_reduction_potential')|float(0.0) - 516)/145) + 10.0 ** ( (states('sensor.pool_monitor_oxidation_reduction_potential')|float(0.0) + states('sensor.pool_monitor_ph')|float(0.0) * 70 -1282) / 40 ) ) |round(1) }}"
unit_of_measurement: ppm
icon_template: mdi:react
friendly_name: "Calculated Free Chlorine"
I’ve added it to my setup but it seems a bit off especially as the temperature of the pool changes. I guess this is what you’re saying.