Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more EZO sensor commands #1865

Closed
wants to merge 3 commits into from

Conversation

thomasdelaet
Copy link

What does this implement/fix?

Add support for calibrating EZO probes and for setting probe type (relevant for EC probe). Calibration can happen using a single value or multi-point calibration (support varies across probe types)

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Configuration change (this will require users to update their yaml configuration files to keep working)

Test Environment

  • ESP32
  • ESP8266
  • Windows
  • Mac OS
  • Linux

Explain your changes

There have been various debates to support more commands (specifically calibration) on these sensors since this needs to happen every couple of months. Currently support for EZO commands was limited to temperature compensation. This PR adds support for:

  • Setting the probe type (relevant for EC probes)
  • Single-point calibration
  • Multi-point calibration

Note that this is my first time writing C++ code. So happy to get feedback.

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

@project-bot project-bot bot added this to Needs Review in ESPHome Dev Jun 5, 2021
@probot-esphome
Copy link

probot-esphome bot commented Jun 5, 2021

Hey there @ssieb, mind taking a look at this pull request as its been labeled with an integration (ezo) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@OttoWinter
Copy link
Member

Friendly ping @ssieb - can you take a look at this? :)

Code LGTM 👍

ESPHome Dev automation moved this from Needs Review to In Review Aug 3, 2021
Comment on lines +17 to +20
static const uint16_t CAL_SINGLE = 0;
static const uint16_t CAL_LOW = 1;
static const uint16_t CAL_MEDIUM = 2;
static const uint16_t CAL_HIGH = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to an enum and move it to the .h file.

@ssieb
Copy link
Member

ssieb commented Aug 3, 2021

Add descriptions of the new methods to the doc page.

@auredor
Copy link

auredor commented Aug 24, 2021

Add descriptions of the new methods to the doc page.

@ssieb Thank you for the improvement. Any commitment on when the documentation will be updated. ?

@github-actions
Copy link
Contributor

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 23, 2021
@github-actions github-actions bot closed this Dec 1, 2021
ESPHome Dev automation moved this from In Review to Cancelled Dec 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2021
ESPHome Dev automation moved this from Cancelled to In Review Sep 23, 2023
ESPHome Dev automation moved this from In Review to Cancelled Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
ESPHome Dev
Cancelled
Development

Successfully merging this pull request may close these issues.

None yet

4 participants