Adding input / parameters to a custom component that is only a sensor

I am using a usb to serial adapter called an ‘ezo’ by the company atlasscientific to connect to ph probes in an automated system.

there are multiple sensors that use the ezousb. Like a ph probe, ec probe, orp probe, etc.

there is a custom component available at here

i have found others have made changes to it, and adapted the code to work with i2c interface instead of the usb-serial interface. found here

my issue is, I want to be able to send a command to the sensor that is created within homeassistant, and the customcomponent is only providing a sensor , no way to interact with it like send a calibration command to the sensor, that then handles it in the python side of the custom component.

I have lightly followed the documents for creating a custom service (found here) but i am still too new to the entire coding for home assistant and python.

I dont doubt ill get this over time, but im hoping someone with some time and skills wouldnt mind pointing me in the right direction.

my goal is to use something along the lines of:
the sensor is created and exist in my homeassistant install as ‘sensor.atlasph’ which is constantly getting a result from the usb adapter to update my sensor status.

to create a service extension so i could call on something like:

 service: atlas_scientific.calibrate
 data:
  entity_id: sensor.ph 
  temp: 60  


 service: atlas_scientific.calibrate
 data:
  entity_id: sensor.ph 
  cal: 4   #(4,7,10)  options of 3 point calibration


 service: atlas_scientific.calibrate
 data:
  entity_id: sensor.ec 
  cal: k10   #(k1,k10,k100)  options of 3 different probes used

any help or nudges in the right direction would be greatly appreciated. thanks!

@docsparks any progress here? My wifi pool kit is under way and I have no plan yet how to calibrate the sensors from HA.

Any progress here? I found on GitHub a few pull requests that do what I believe we’re looking for, but I can’t seem to get it flashed onto my esphome device (Atlas Scientific Hydroponics and Aquaponics Kit)

This is the one that’s been tested with esp32 so it’s the one I want to use the most:

This one is open, but has no files to flash: Pull Request 1179

It references this pull request that pretty much accomplishes the same thing as the other one, but it’s based on esp8266 devices:

I’d really love to stay in Home Assistant and ESPHome specifically to run everything without having to figure out Tasmota or Thingspeak integration via MQTT.

Thank you very much for taking the time and helping all us out!