8000 Fix HLW8012 sensor not returning values if change_mode_every is set to never by SuperPlusUser · Pull Request #8456 · esphome/esphome · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix HLW8012 sensor not returning values if change_mode_every is set to never #8456

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

SuperPlusUser
Copy link
Contributor

What does this implement/fix?

This small change fixes the issue that the hlw8012 sensor component does not output any values if change_mode_every is set to never

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)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

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

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

sensor:
  - platform: hlw8012
    sel_pin: GPIOXX
    cf_pin: GPIOXX
    cf1_pin: GPIOXX
    voltage:
      name: "HLW8012 Voltage"
    initial_mode: VOLTAGE
    change_mode_every: never

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:

@codecov-commenter
Copy link
codecov-commenter commented Mar 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.92%. Comparing base (4d8b5ed) to head (4076ecc).
Report is 2226 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8456      +/-   ##
==========================================
+ Coverage   53.70%   54.92%   +1.21%     
==========================================
  Files          50       50              
  Lines        9408     9910     +502     
  Branches     1654     1353     -301     
==========================================
+ Hits         5053     5443     +390     
- Misses       4056     4124      +68     
- Partials      299      343      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jesserockz jesserockz added this to the 2025.4.2 milestone May 1, 2025
@jesserockz jesserockz merged commit 9a9b91b into esphome:dev May 1, 2025
26 checks passed
@jesserockz jesserockz mentioned this pull request May 11, 2025
sa-crespo pushed a commit to sa-crespo/esphome that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HLW8012 change_mode_every set to never returns no values
3 participants
0