From 8dfb5cbee131cce2e036fb8e20dbc2dd3727a6f4 Mon Sep 17 00:00:00 2001 From: itsthekayl Date: Sun, 22 Sep 2024 18:44:06 -0400 Subject: [PATCH 1/6] Update README.md Updated supported devices; fixed typo --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed6165e..c641c95 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ ## Supported Devices -* Granary Feeder (PLAF103) +* Granary Smart Feeder (PLAF103) +* Granary Camera Feeder ## Installation @@ -31,4 +32,4 @@ Get the folder `custom_components/petlibro` in your HA `config/custom_components - Enter your credentials. > Only one device can be login at the same time > - > If you to wan to keep your phone connected, create another account for this integration and share your device to it \ No newline at end of file + > If you to want to keep your phone connected, create another account for this integration and share your device to it \ No newline at end of file From 7912607cceef1dfd5705ac8e5b03612f99e5fd68 Mon Sep 17 00:00:00 2001 From: itsthekayl Date: Sun, 22 Sep 2024 18:57:30 -0400 Subject: [PATCH 2/6] Update and rename granary_feeder.py to granary_smart_feeder.py updated file name; changed GranaryFeeder class to GranarySmartFeeder --- .../feeders/{granary_feeder.py => granary_smart_feeder.py} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename custom_components/petlibro/devices/feeders/{granary_feeder.py => granary_smart_feeder.py} (95%) diff --git a/custom_components/petlibro/devices/feeders/granary_feeder.py b/custom_components/petlibro/devices/feeders/granary_smart_feeder.py similarity index 95% rename from custom_components/petlibro/devices/feeders/granary_feeder.py rename to custom_components/petlibro/devices/feeders/granary_smart_feeder.py index dd9af5b..f2fc081 100644 --- a/custom_components/petlibro/devices/feeders/granary_feeder.py +++ b/custom_components/petlibro/devices/feeders/granary_smart_feeder.py @@ -3,7 +3,7 @@ from .feeder import Feeder -class GranaryFeeder(Feeder): +class GranarySmartFeeder(Feeder): async def refresh(self): await super().refresh() self.update_data({ From b065e61538001b205cfa5a483cc8ce6aa4fa628b Mon Sep 17 00:00:00 2001 From: itsthekayl Date: Sun, 22 Sep 2024 18:59:17 -0400 Subject: [PATCH 3/6] Update granary_camera_feeder.py updated references from GranaryFeeder to GranarySmartFeeder --- .../petlibro/devices/feeders/granary_camera_feeder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/petlibro/devices/feeders/granary_camera_feeder.py b/custom_components/petlibro/devices/feeders/granary_camera_feeder.py index 5ad2840..c055bd6 100644 --- a/custom_components/petlibro/devices/feeders/granary_camera_feeder.py +++ b/custom_components/petlibro/devices/feeders/granary_camera_feeder.py @@ -1,4 +1,4 @@ -from .granary_feeder import GranaryFeeder +from .granary_smart_feeder import GranarySmartFeeder -class GranaryCameraFeeder(GranaryFeeder): +class GranaryCameraFeeder(GranarySmartFeeder): pass From edbf68fe6fbd0cf655d6fc6d98630c6deaddd2ce Mon Sep 17 00:00:00 2001 From: itsthekayl Date: Sun, 22 Sep 2024 19:00:59 -0400 Subject: [PATCH 4/6] Update __init__.py updated references from GranaryFeeder to GranarySmartFeeder --- custom_components/petlibro/devices/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/petlibro/devices/__init__.py b/custom_components/petlibro/devices/__init__.py index 8c2f312..b79c475 100644 --- a/custom_components/petlibro/devices/__init__.py +++ b/custom_components/petlibro/devices/__init__.py @@ -1,9 +1,9 @@ from typing import Dict, Type from .device import Device -from .feeders.granary_feeder import GranaryFeeder +from .feeders.granary_smart_feeder import GranarySmartFeeder from .feeders.granary_camera_feeder import GranaryCameraFeeder product_name_map : Dict[str, Type[Device]] = { - "Granary Feeder": GranaryFeeder, + "Granary Smart Feeder": GranarySmartFeeder, "Granary Camera Feeder": GranaryCameraFeeder } From ed72b1e30cc56d9d0fb12cba06bc1f0284221ea9 Mon Sep 17 00:00:00 2001 From: itsthekayl Date: Sun, 22 Sep 2024 19:02:21 -0400 Subject: [PATCH 5/6] Update __init__.py updated references from GranaryFeeder to GranarySmartFeeder --- custom_components/petlibro/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/petlibro/__init__.py b/custom_components/petlibro/__init__.py index 003c443..7179e14 100644 --- a/custom_components/petlibro/__init__.py +++ b/custom_components/petlibro/__init__.py @@ -7,7 +7,7 @@ from custom_components.petlibro.devices.feeders.feeder import Feeder from .devices import Device -from .devices.feeders.granary_feeder import GranaryFeeder +from .devices.feeders.granary_smart_feeder import GranarySmartFeeder from .const import DOMAIN from .hub import PetLibroHub @@ -17,7 +17,7 @@ Feeder: ( Platform.SWITCH, ), - GranaryFeeder: ( + GranarySmartFeeder: ( Platform.SENSOR, ), } From e69f721557704a81eff4269d7e2aee5152e1f60a Mon Sep 17 00:00:00 2001 From: itsthekayl Date: Sun, 22 Sep 2024 19:05:27 -0400 Subject: [PATCH 6/6] Update sensor.py updated references from GranaryFeeder to GranarySmartFeeder --- custom_components/petlibro/sensor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/petlibro/sensor.py b/custom_components/petlibro/sensor.py index 6f9058b..e81dde3 100644 --- a/custom_components/petlibro/sensor.py +++ b/custom_components/petlibro/sensor.py @@ -18,7 +18,7 @@ from .devices import Device from .devices.feeders.feeder import Feeder -from .devices.feeders.granary_feeder import GranaryFeeder +from .devices.feeders.granary_smart_feeder import GranarySmartFeeder from . import PetLibroHubConfigEntry from .entity import PetLibroEntity, _DeviceT, PetLibroEntityDescription @@ -95,13 +95,13 @@ def device_class(self) -> SensorDeviceClass | None: DEVICE_SENSOR_MAP: dict[type[Device], list[PetLibroSensorEntityDescription]] = { - GranaryFeeder: [ - PetLibroSensorEntityDescription[GranaryFeeder]( + GranarySmartFeeder: [ + PetLibroSensorEntityDescription[GranarySmartFeeder]( key="remaining_desiccant", translation_key="remaining_desiccant", icon="mdi:package" ), - PetLibroSensorEntityDescription[GranaryFeeder]( + PetLibroSensorEntityDescription[GranarySmartFeeder]( key="today_feeding_quantity", translation_key="today_feeding_quantity", icon="mdi:scale", @@ -109,7 +109,7 @@ def device_class(self) -> SensorDeviceClass | None: device_class_fn=device_class_feeder, state_class=SensorStateClass.TOTAL_INCREASING ), - PetLibroSensorEntityDescription[GranaryFeeder]( + PetLibroSensorEntityDescription[GranarySmartFeeder]( key="today_feeding_times", translation_key="today_feeding_times", icon="mdi:history",