jcallaghan / home-assistant-config

My Home Assistant configuration & documentation.
https://www.jcallaghan.com/
MIT License
175 stars 8 forks source link

ph sensor #292

Open MrThiemann opened 2 years ago

MrThiemann commented 2 years ago

hey, First of all, thank you for this great post! it helps me a lot with my pool control!! I have the same pH sensor as you, but have enormous difficulties integrating it with me. I'm either missing it or it's not there: your code for the sensor.

I've really tried quite a few things.. with "attenuation"... or without. times on auto and now on 11db. I once had the sensor at 3.3 V and now at 5 - but somehow that doesn't want to.

could you help me

- platform: adc
   attenuation: 11db
   pin: GPIO34
   name: "PHSensor"
   update_interval: 1s
   unit_of_measurement: "pH"
   icon: "mdi:water-percent"
#    filters:
#     - lambda: return (133.42*x*x*x - 255.86*x*x + 857.39*x)*0.5;
#    - sliding_window_moving_average:
#        window_size: 15
#         send_every: 15
#     - median:
#         window_size: 7
#         send_every: 4
#         send_first_at: 3
#     - calibrate_linear:
#         - 0.70 -> 4.0  #voltage value when entering sensor in PH of 4 solution 0.73400
#         - 1.051 -> 7.0    #voltage value when entering sensor in PH of 7 solution 1.05100