diff --git a/README.md b/README.md index f729258..7acf8c5 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ Each Feeder has the following entities: | `Battery installed` | `Binary Sensor` | If batteries are removed or installed, power cycling the feeder is required for the status to update. | | `Battery status` | `Sensor` | - Will only become available when feeder is running on batteries.
- Indicates the battery level (Normal or Low). | | `Dispensed` | `Sensor` | Amount of food, in grams, dispensed today. | +| `Error` | `Sensor` | Identifies any errors reported by the feeder. | | `Manually dispensed` | `Sensor` | Amount of food, in grams, manually dispensed today. | | `Planned` | `Sensor` | Amount of food, in grams, that the feeder plans to dispense today. | | `Planned dispensed` | `Sensor` | Of the planned amount that is to be dispensed today, amount of food (grams) that has been dispensed. | @@ -166,6 +167,7 @@ Each Feeder has the following entities: | `Child lock` | `Switch` | Only available if your feeder is online (connected to PetKit's servers). | | `Reset desiccant` | `Button` | - Allows you to reset the desiccant back to 30 days after replacing it.
- Only available if your feeder is online (connected to PetKit's servers). | | `Battery status` | `Sensor` | - Will only become available when feeder is running on batteries.
- Indicates the battery level (Normal or Low). | +| `Error` | `Sensor` | Identifies any errors reported by the feeder. | | `RSSI` | `Sensor` | WiFi connection strength. | | `Status` | `Sensor` | `Normal` = Feeder is connected to PetKit's servers
`Offline` = Feeder is not connected to PetKit servers
`On Batteries` = If installed, feeder is currently being powered by the batteries. | diff --git a/custom_components/petkit/button.py b/custom_components/petkit/button.py index 558b637..7247187 100644 --- a/custom_components/petkit/button.py +++ b/custom_components/petkit/button.py @@ -5,6 +5,7 @@ import asyncio from petkitaio.constants import LitterBoxCommand, W5Command +from petkitaio.exceptions import BluetoothError from petkitaio.model import Feeder, LitterBox, W5Fountain from homeassistant.components.button import ButtonEntity @@ -16,6 +17,7 @@ from .const import DOMAIN, FEEDERS, LITTER_BOXES, WATER_FOUNTAINS from .coordinator import PetKitDataUpdateCoordinator +from .exceptions import PetKitBluetoothError async def async_setup_entry( diff --git a/custom_components/petkit/manifest.json b/custom_components/petkit/manifest.json index 008f56b..2143f24 100644 --- a/custom_components/petkit/manifest.json +++ b/custom_components/petkit/manifest.json @@ -9,5 +9,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/RobertD502/home-assistant-petkit/issues", "requirements": ["petkitaio==0.1.1", "tzlocal>=4.2"], - "version": "0.1.0b1" + "version": "0.1.0b2" } diff --git a/custom_components/petkit/sensor.py b/custom_components/petkit/sensor.py index 830e434..f95b80a 100644 --- a/custom_components/petkit/sensor.py +++ b/custom_components/petkit/sensor.py @@ -62,6 +62,7 @@ async def async_setup_entry( FeederDesiccant(coordinator, feeder_id), FeederBattStatus(coordinator, feeder_id), FeederRSSI(coordinator, feeder_id), + FeederError(coordinator, feeder_id), )) # D3 & D4 @@ -85,7 +86,6 @@ async def async_setup_entry( AmountEaten(coordinator, feeder_id), TimesEaten(coordinator, feeder_id), FoodInBowl(coordinator, feeder_id), - FeederError(coordinator, feeder_id), )) # Litter boxes