Skip to content

Commit

Permalink
[surepetcare] API change pet weight (openhab#18105)
Browse files Browse the repository at this point in the history
* API seems to be changed at some point... the weight is now in gram not in kilogram anymore

Signed-off-by: Holger Eisold <github@eisold.family>
  • Loading branch information
HerzScheisse authored Jan 14, 2025
1 parent 184ef67 commit 95aaf1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.surepetcare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Channel names in **bold** are read/write, everything else is read-only
| locationChanged | DateTime | The time when the location was last changed |
| locationTimeoffset | String | Time-Command to set the pet location with a time offset. (10, 30 or 60 minutes ago) |
| locationChangedThrough | Text | The device name or username where the pet left/entered the house |
| weight | Number:Mass | The pet's weight (in kilogram) |
| weight | Number:Mass | The pet's weight (in gram) |
| dateOfBirth | DateTime | The pet's date of birth |
| feederDevice | Text | The device from which the pet last ate |
| feederLastChange | Number:Mass | The last eaten change in gram (big bowl) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected void updateThing() {
updateState(PET_CHANNEL_DATE_OF_BIRTH, pet.dateOfBirth == null ? UnDefType.UNDEF
: new DateTimeType(pet.dateOfBirth.atStartOfDay(ZoneId.systemDefault())));
updateState(PET_CHANNEL_WEIGHT,
pet.weight == null ? UnDefType.UNDEF : new QuantityType<>(pet.weight, SIUnits.KILOGRAM));
pet.weight == null ? UnDefType.UNDEF : new QuantityType<>(pet.weight, SIUnits.GRAM));
if (pet.tagId != null) {
SurePetcareTag tag = petcareAPI.getTag(pet.tagId.toString());
if (tag != null) {
Expand Down

0 comments on commit 95aaf1d

Please sign in to comment.