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

Fix SHT3xd fails sometimes in 2024.4.0 #6592

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

mrtoy-me
Copy link
Contributor

@mrtoy-me mrtoy-me commented Apr 20, 2024

What does this implement/fix?

Update to this component in release 2024.4.0 caused failure for some users on reading serial number.
This fix reinstates original register for reading serial number and if this fails the alternate is used. Error codes have been added to setup and are shown in dump_config

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)
  • Other

Related issue or feature (if applicable): fixes esphome/issues issue#5710
User that raised issue has tested fix successfully plus another user

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

Test Environment

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

Example entry for config.yaml:

NA

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:

1) read serial number using clock stretching enabled register and if that fails try alternative clock stretching disabled register
2) add error codes to setup show in dump_config()
@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.43%. Comparing base (4d8b5ed) to head (81e96b4).
Report is 431 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6592      +/-   ##
==========================================
- Coverage   53.70%   53.43%   -0.28%     
==========================================
  Files          50       50              
  Lines        9408     9537     +129     
  Branches     1654     1685      +31     
==========================================
+ Hits         5053     5096      +43     
- Misses       4056     4130      +74     
- Partials      299      311      +12     

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

esphome/components/sht3xd/sht3xd.cpp Show resolved Hide resolved
esphome/components/sht3xd/sht3xd.cpp Outdated Show resolved Hide resolved
@esphome esphome bot marked this pull request as draft April 22, 2024 22:28
@esphome
Copy link

esphome bot commented Apr 22, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
@mrtoy-me
Copy link
Contributor Author

@jesserockz - I committed your suggested changes. This should bring things back to where they were. I am seeing if I can resolve issue#5303 - hopefully ready for May. Thanks

@mrtoy-me mrtoy-me marked this pull request as ready for review April 22, 2024 23:06
@esphome esphome bot requested a review from jesserockz April 22, 2024 23:06
@jesserockz jesserockz added this to the 2024.4.2 milestone Apr 22, 2024
@jesserockz jesserockz merged commit b737fe7 into esphome:dev Apr 22, 2024
53 checks passed
@digiblur
Copy link

Thanks for this!! I rolled back to 2024.3 as I had failures at random times with the sensor. Looking forward to the fix!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sht3xd component breaks in 2024.4.0, works in 2024.3.2
4 participants