Hi!
Yes, I did. They pushed through the pull requests for the EZO sensors (and another one for the Atlas Scientific Pumps), so all you have to do is create buttons for what action you’d like to perform.
https://esphome.io/components/sensor/ezo.html?highlight=ezo was pretty confusing to me because I don’t know much about lambda calls or c++, but @ssieb was nice enough to help me out further with this reply.
One thing to watch out for: In order to verify the buttons were in fact working I ran the ESPHome log on my computer while pressing the buttons from my phone to see if there were any changes to the log. I was unable to get get_calibration():
to respond with info, but all the rest I tried seem to work fine. I had no issues with send_command():
and believe this could be the “easier” way.
Here’s two examples that achieve the same results:
First make sure you have
logger:
level: verbose
Now you can use the already setup Lambda Calls that @gvdhoven championed.
button:
- platform: template
name: "Get Device Info for pH Sensor"
on_press:
then:
- lambda: |-
id(paste_id_here).get_device_information();
or with the included send_custom():
command.
button:
- platform: template
name: "Get Device Info for pH Sensor (custom)"
on_press:
then:
- lambda: |-
id(paste_id_here).send_custom("i");
Specifically for the calibration commands:
id(paste_id_here).send_custom("Cal,clear");
(not necessary, but if you want)
id(paste_id_here).send_custom("Cal,mid,7.00");
(do mid calibration first so it doesn’t clear the previous info)
id(paste_id_here).send_custom("Cal,low,4.00");
id(paste_id_here).send_custom("Cal,high,10.00");
and to verify id(paste_id_here).send_custom("Cal,?");
The full list of commands you can send to the sensors can be found on Atlas Scientific’s site. Here’s the pH sensor datasheet. (as a side note I found id(paste_id_here).send_custom("Slope,?");
to be very interesting.)
I’m sure there’s a way to create a logbook that shows the results of the button presses in HA so you don’t have to use two devices or have verbose logs… but I haven’t gotten that far.
Hope this helps!