Skip to content

Commit 2aa8d3a

Browse files
committed
Restore device_sn property
1 parent 438c764 commit 2aa8d3a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: custom_components/petlibro/devices/feeders/polar_wet_food_feeder.py

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ async def refresh(self):
3535
def battery_state(self) -> str | None:
3636
return self._data.get("batteryState")
3737

38+
@property
39+
def device_sn(self) -> str:
40+
"""Returns the serial number of the device."""
41+
return self._data.get("deviceSn", "unknown")
42+
3843
@property
3944
def door_blocked(self) -> bool | None:
4045
return self._data.get("realInfo", {}).get("barnDoorError")

Diff for: custom_components/petlibro/sensor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def device_class(self) -> SensorDeviceClass | None:
543543
],
544544
PolarWetFoodFeeder: [
545545
PetLibroSensorEntityDescription[PolarWetFoodFeeder](
546-
key="serial",
546+
key="device_sn",
547547
translation_key="device_sn",
548548
icon="mdi:identifier",
549549
name="Device SN"

0 commit comments

Comments
 (0)