I am trying to control ESPHOME calibrate_linear values using HA.
I am recieving PH data vrom my ads1115 module and doing the initial callibration with calibrate_linear filter. My code looks like this:
ads1115:
- address: 0x48
sensor:
- platform: ads1115
multiplexer: 'A0_GND'
name: "ADS1115 Channel A0-GND"
filters:
- calibrate_linear:
# Map 0.0 (from sensor) to 0.0 (true value)
- 0.0 -> 0.0
- 120.0 -> 4.01
- 245.0 -> 7.01
I want to calibrate it using home assistant. I was thinking about global variables, but I can not understand how to implement it using HA. I would create the input number component in home assistant, then would apply the value of it to the sensro. In ESPHOME I would create the homeassistant component which would read the value of the sensor. But how can I assitn it to the map value from sensor in the calibrate linear of the ESPHOME?
Or maybe it is better to get raw data from ESPHOME and then calibrate it in homeassistant?
Thank you in advance.