Feature/Per-Pet RFID Fountain Drinking Sensors (#92) - #229
Merged
jjjonesjr33 merged 6 commits intoMay 20, 2026
Merged
Conversation
Shared accounts return empty from getBoundDevices, so also check the hub's loaded devices for DockstreamSmartRFIDFountain instances. The wearListV2 response filters by petId so only matching data is used.
…llbacks The base PL_PetEntity.entity_registry_enabled_default property uses an 'or super()' fallback that defaults to True, meaning these callbacks could never actually disable entities. Remove them rather than ship dead code.
jasoncronje
force-pushed
the
Feature/RFID-Fountain-Per-Pet-Drinking-Sensors
branch
from
May 3, 2026 19:44
27298af to
33005d7
Compare
1 task
Contributor
Author
|
Resolved all conflicts. Since I only have one fountain, I requested that someone else from #92 test with multiple fountains. |
Contributor
|
@FeliGoblin, FYI |
|
I have 5 RFID fountains and 5 pets. Using the latest commits to jasoncronje:Feature/RFID-Fountain-Per-Pet-Drinking-Sensors, all 5 of my pets appear correctly and the sums all look correct! |
jjjonesjr33
approved these changes
May 20, 2026
jjjonesjr33
left a comment
Owner
There was a problem hiding this comment.
Looks good, great work @jasoncronje will load this into a pre-release
1 task
This was referenced Aug 16, 2026
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:
Closes #92.
Adds three per-pet drinking sensors for the Dockstream Smart RFID Fountain (PLWF305), sourced from the
wearListV2API endpoint. Sensors appear under each pet's Home Assistant device:How it works
device_wear_list(device_sn)method onPetLibroAPIfollows the existing 10-second cache pattern used byget_device_real_infoand friends.Pet.refresh()now also querieswearListV2for any RFID fountains the pet is bound to, then aggregates per-pet drinking stats (sums across multiple fountains if applicable).PL_PetSensorEntityentries inPET_ENTITY_MAPexpose the data, with translations for all 13 supported languages.Shared account handling
getBoundDevicesreturns empty for shared (non-owner) accounts, so the implementation also falls back to the hub's loaded RFID fountain devices. ThewearListV2response is filtered bypetIdso only the relevant pet's data is used. This mirrors the workaround pattern recommended in the issue thread.Edge cases handled
nullfor pets that haven't drunk today → treated as0wearListV2call fails → logged and skipped, pet refresh continuesFiles changed
custom_components/petlibro/api.py— newdevice_wear_list()methodcustom_components/petlibro/pets/__init__.py— updatedrefresh(), 3 new propertiescustom_components/petlibro/pets/entity.py— 3 new sensor descriptions inPET_ENTITY_MAPcustom_components/petlibro/translations/*.json— 3 new translation keys across 13 filesTesting
Verified live on a personal HA dev instance with a Dockstream Smart RFID Fountain bound to two cats:
Notes
entity_registry_enabled_default_fnplumbing on pet entities has anor super()fallback that prevents disabling — keeping behavior consistent with other pet entities).Screenshots