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

Use built-in validation for altitude #1831

Merged
merged 4 commits into from May 31, 2021

Conversation

agners
Copy link
Contributor

@agners agners commented May 24, 2021

This improves the error location and message while being still backwards
compatible.

What does this implement/fix?

Quick description

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)

Related issue or feature (if applicable):

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP8266
  • Windows
  • Mac OS
  • Linux

Example entry for config.yaml:

# Example config.yaml
sensor:
  - platform: scd30
    co2:
      id: sensirion
      name: "Sensirion CO2"
      retain: False
      accuracy_decimals: 1
    temperature:
      name: "Sensirion Temperature"
      retain: False
      accuracy_decimals: 2
    humidity:
      name: "Sensirion Humidity"
      retain: False
      accuracy_decimals: 1
    altitude_compensation: 500m
    address: 0x61
    update_interval: 60s

Explain your changes

Describe your changes here to communicate to the maintainers why we should accept this pull request.
Very important to fill if no issue linked

Checklist:

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

If user exposed functionality or configuration variables are added/changed:

This improves the error location and message while being still backwards
compatible.
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

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

Thanks

ESPHome Dev automation moved this from Needs Review to Reviewer Approved May 31, 2021
@jesserockz jesserockz merged commit d1c6368 into esphome:dev May 31, 2021
ESPHome Dev automation moved this from Reviewer Approved to Done May 31, 2021
This was referenced Jun 9, 2021
This was referenced Jun 16, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants