Improve code and bug fix#230
Merged
Jezza34000 merged 7 commits intoJezza34000:mainfrom May 6, 2026
Merged
Conversation
for more information, see https://pre-commit.ci
Owner
|
Hi @astrinh0, thank you so much for all these corrections and improvements. I'm testing it in my test environment and will get back to you when it's finished. The only thing that might conflict with the upcoming PR (#227) is the part concerning : "Store config-flow region as a country code" |
Contributor
Author
|
Hi @Jezza34000 no problem, do all the test since I don't test it 😊 |
|
Jezza34000
approved these changes
May 6, 2026
Owner
|
I've made some modification @astrinh0 it's Ok to merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



📝 Proposed Change / Description
This PR fixes several stability and correctness issues in the Petkit Home Assistant integration.
It improves coordinator setup, config migration for older entries, stale-device cleanup, entity availability handling, and feeder/manual-feed controls. It also fixes a few unit and fallback-value issues that could make entities display incorrectly or behave unexpectedly.
Fixes: #---
🔖 Type of change
🐾 Affected devices
Specific type:
Specific category :
If your device is not listed, please specify it here:
PETKIT EVERSWEET, PETKIT FRESH ELEMENT SOLO
🧪 How has this been tested?
Device(s) tested on:
Not tested on a live Home Assistant instance in this environment.
Other devices you own when the test was done:
PETKIT EVERSWEET, PETKIT FRESH ELEMENT SOLO
Validation performed:
git diff --checkmanifest.jsonsuccessfullyFull Python compile/lint was not run locally because only Python 3.9 is available in this environment, while the integration uses newer Python syntax.
✅ Checklist
pre-commit run -ahooks and all checks passmain📸 Screenshots / Logs (optional)
N/A
ℹ️ Additional context
Main fixes included:
hass.data400g20-60 minNonefor unknown purifier fan preset mode instead of integer0Description of changes:
None.
Thanks for the helping paw! 🐾