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!