[surepetcare] API change pet weight (#18105)

* 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>
pull/17935/head
Holger André Eisold 2025-01-14 20:52:29 +01:00 committed by GitHub
parent 184ef673a2
commit 95aaf1d717
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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) |

View File

@ -181,7 +181,7 @@ public class SurePetcarePetHandler extends SurePetcareBaseObjectHandler {
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) {