Code Monkey home page Code Monkey logo

home-assistant-petkit's Introduction


PetKit Home Assistant Integration

Custom Home Assistant component for controlling and monitoring PetKit devices and pets.

Current version GitHub GitHub manifest.json dynamic (path) Total lines count

Buy Me A Coffee Donate using Liberapay

A lot of work has been put into creating the backend and this integration. If you enjoy this integration, consider donating by clicking on one of the supported methods above.

*All proceeds go towards helping a local animal rescue.


Discord Server

Discord

Join the Home Assistant PetKit discord server to follow development news or to share ideas with other users.

Currently Supported Devices

Feeders

Caution

YumShare feeders are NOT currently supported, but will be in the future. Once they are supported this message will be removed.

Litter Boxes

Purifiers

Water Fountains

Bluetooth only devices that don't use PetKit's BLE relay such as trackers (i.e., PetKit Fit) will not be supported: syncing new data from a bluetooth tracker requires the PetKit mobile app to communicate with the tracker which is not possible when your PetKit account is already in use with this integration.

Prior To Installation

  • This integration requires using your PetKit account email (number for PetKit China accounts) and password. Third-party account sign-in methods (Facebook, Apple, Twitter) are not supported.

Caution

If using another PetKit integration that uses the petkit domain, you will need to delete it prior to installing this integration. You'll also need to remove any mention of it from your configuration.yaml file.

Caution

If you are running Home Assistant as a Docker container, the TZ environment variable must be set.

Important - Please Read:

PetKit Account & Family Sharing Feature:

Important

  • PetKit accounts can only be logged in on one device at a time. Using this integration will result in getting signed out of the mobile app. You can continue using the mobile app by creating a secondary account and sharing devices to it from the main account using the family share feature.

Caution

  • You MUST use the primary (main) account with this integration and not the secondary account that had devices shared to it using the family share feature. Using the secondary account will result in no devices being pulled in by this integration.

If you have a water fountain:

Note

Note #1: Getting the most recent data from your water fountain, as well as controlling the water fountain, requires that the BLE relay is set up within the PetKit app. Otherwise, you will be limited to data that isn't up-to-date and no ability to control the water fountain as it requires another compatible PetKit device acting as a BLE relay.

Note

Note #2: If you have the BLE relay set up, please be sure to follow these direction prior to using the integration:

  • Sign out of the PetKit app and turn off bluetooth on your phone, tablet, etc.
  • With bluetooth turned off, force close the PetKit app (be sure to do this on any device that was using your account with the PetKit app).
  • Unplug all PetKit devices. Once all are off, you may plug them in again.
  • With all devices powered back on, you can turn bluetooth back on (on your mobile device or tablet).
  • Proceed with the installation and setup instructions for this integration.

Although these steps may seem tedious, they are a necessary evil. The PetKit app will ping the bluetooth endpoints and initiate the relay even with your account signed out. The only way of giving the integration control/the ability to initiate the relay is to sever any bluetooth connection that the app has started.

Using the PetKit app:

If you want to momentarily use the PetKit app with your primary account to change some settings, be sure to disable the PetKit integration before logging into the app. If you don't, you will be asked to reauthenticate. Once you are done making changes within the app, re-enable the integration.

If you needed the BLE relay while using the app (bluetooth turned on on your device), please be sure to follow the steps in Note #2 above in order to sever the BLE relay connection started by the PetKit app.

Installation

With HACS

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Tip

If you are unable to use the button above, manually search for PetKit in HACS.

Manual

Copy the petkit directory, from custom_components in this repository, and place it inside your Home Assistant Core installation's custom_components directory. Restart Home Assistant prior to moving on to the Setup section.

Warning

If installing manually, in order to be alerted about new releases, you will need to subscribe to releases from this repository.

Setup

Open your Home Assistant instance and start setting up a new integration.

Tip

If you are unable to use the button above, follow the steps below:

  1. Navigate to the Home Assistant Integrations page (Settings --> Devices & Services)
  2. Click the + ADD INTEGRATION button in the lower right-hand corner
  3. Search for PetKit

Caution

  • Be sure to select the country associated with your account (Hong Kong users should select Hong Kong, not China).
  • During setup, set the timezone option to Set Automatically. If the tzlocal library isn't able to fetch your timezone, please manually select your timezone.

The current polling interval is set to 2 minutes (120 seconds). If you would like to set a different polling interval, change the polling interval option (via the UI). Keep in mind, setting the polling interval too short may result in your account getting rate limited/blocked.

Devices

Each PetKit device and pet is represented as a device in Home Assistant. Within each device are several entities described below.

Feeders


Fresh Element Infinity (click to expand)
Each Feeder has the following entities:
Entity Entity Type Additional Comments
Call pet Button Only available if your feeder is online (connected to PetKit's servers).
Cancel manual feed Button - Only available if your feeder is online (connected to PetKit's servers).
- Will cancel a manual feeding that is currently in progress.
Indicator light Switch Only available if your feeder is online (connected to PetKit's servers).
Manual Feed Number - Only available if your feeder is online (connected to PetKit's servers).
- Select the amount of food, in grams, you'd like to dispense immediately.
- Note: valid amount ranges from 5-200 grams in increments of 1 gram.
Desiccant days remaining Sensor Number of days left before the desiccant needs to be replaced.
Food level Binary Sensor Allows for determining if there is a food shortage.
Child lock Switch Only available if your feeder is online (connected to PetKit's servers).
Do not disturb 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).
Sound Select - Allows you to select which sound is played when calling your pet.
- Default sound is selected if no self-recorded sounds are available or selected.
- Only available if your feeder is online (connected to PetKit's servers).
Surplus Number - Allows for selecting weight in bowl that is considered to be surplus.
- If a surplus amount is selected and surplus control is enabled, planned feedings will stop when the weight of food detected in the bowl is equal to the surplus amount.
- Only available if your feeder is online (connected to PetKit's servers).
Surplus control Switch - Enable or disable surplus control.
- Only available if your feeder is online (connected to PetKit's servers).
System notification sound Switch - Enable or disable system notification sound.
- Only available if your feeder is online (connected to PetKit's servers).
Voice with dispense Switch - Enable or disable sound (selected in Sound entity) to play with every feeding.
- Only available if your feeder is online (connected to PetKit's servers).
Volume Number - Allows for controlling feeder sound volume.
- Only available if your feeder is online (connected to PetKit's servers).
Amount eaten Sensor Amount of food your pet has eaten from the bowl today.
Battery Binary Sensor Indicates if your battery is charging or not charging.
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.
Food in bowl Sensor Amount of food, in grams, that is currently in the bowl.
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.
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 = Feeder is currently being powered by the batteries.
Times dispensed Sensor Number of times food has been dispensed today.
Times eaten Sensor Number of times pet ate today.
Fresh Element Solo (click to expand)
Each Feeder has the following entities:
Entity Entity Type Additional Comments
Cancel manual feed Button - Only available if your feeder is online (connected to PetKit's servers).
- Will cancel a manual feeding that is currently in progress.
Indicator light Switch Only available if your feeder is online (connected to PetKit's servers).
Manual feed Select - Allows setting the amount of food to dispense immediately.
- Only available if your feeder is online (connected to PetKit's servers).
Desiccant days remaining Sensor Number of days left before the desiccant needs to be replaced.
Food level Binary Sensor Allows for determining if there is a food shortage.
Child lock Switch Only available if your feeder is online (connected to PetKit's servers).
Dispense tone Switch Only available if your feeder is online (connected to PetKit's servers).
Food shortage alarm 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 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.
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.
Times dispensed Sensor Number of times food has been dispensed today.
Fresh Element Mini Pro (click to expand)
Each Feeder has the following entities:
Entity Entity Type Additional Comments
Indicator light Switch Only available if your feeder is online (connected to PetKit's servers).
Manual feed Select - Allows setting the amount of food to dispense immediately.
- Only available if your feeder is online (connected to PetKit's servers).
Desiccant days remaining Sensor Number of days left before the desiccant needs to be replaced.
Food level Binary Sensor Allows for determining if there is a food shortage.
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.

Friendly Note: Mini feeders have a bug when batteries are installed that has never been addressed by PetKit. This can result in your device locking up until the batteries are removed and feeder is power cycled. I am not sure what triggers this bug, but as a safety measure I don't install batteries into mini feeders.

Fresh Element Gemini (click to expand)
Each Feeder has the following entities:
Entity Entity Type Additional Comments
Cancel manual feed Button - Only available if your feeder is online (connected to PetKit's servers).
- Will cancel a manual feeding that is currently in progress.
Indicator light Switch Only available if your feeder is online (connected to PetKit's servers).
Manual feed Text - Allows setting the amount of portions to dispense immediately from hopper 1 and 2.
- Only available if your feeder is online (connected to PetKit's servers).
- Valid text is in the form number,number. For example, setting a value of 1,2 will dispense one portion from hopper 1 and 2 portions from hopper 2. Allowed portion sizes for each hooper range from and include 0 to 10.
Desiccant days remaining Sensor Number of days left before the desiccant needs to be replaced.
Food level hopper 1 Binary Sensor Allows for determining if there is a food shortage in hopper 1.
Food level hopper 2 Binary Sensor Allows for determining if there is a food shortage in hopper 2.
Child lock Switch Only available if your feeder is online (connected to PetKit's servers).
Dispense tone Switch Only available if your feeder is online (connected to PetKit's servers).
Food replenished Button Tells the PetKit servers that you have replenished hopper 1 and 2 with food. If you don't do this after replenishing food, the food level for hoppers 1 and 2 won't update until a manual feeding is sent or until the next scheduled feeding.
Food shortage alarm Switch Only available if your feeder is online (connected to PetKit's servers).
Minimum eating duration Number Minimum amount of time, in seconds, pet has to eat food before it is recorded.
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).
Average eating time Sensor Average amount of time pet(s) have spent eating food.
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 hopper 1 Sensor Amount of portions dispensed from hopper 1 today.
Dispensed hopper 2 Sensor Amount of portions dispensed from hopper 2 today.
Error Sensor Identifies any errors reported by the feeder.
Manually dispensed hopper 1 Sensor Amount of portions manually dispensed from hopper 1 today.
Manually dispensed hopper 2 Sensor Amount of portions manually dispensed from hopper 2 today.
Planned dispensed hopper 1 Sensor Of the planned amount that is to be dispensed today, amount of portions that have been dispensed from hopper 1.
Planned dispensed hopper 2 Sensor Of the planned amount that is to be dispensed today, amount of portions that have been dispensed from hopper 2.
Planned hopper 1 Sensor Amount of portions that the feeder plans to dispense from hopper 1 today.
Planned hopper 2 Sensor Amount of portions that the feeder plans to dispense from hopper 2 today.
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.
Times dispensed Sensor Number of times food has been dispensed today.
Times eaten Sensor Number of times pet(s) ate today.
Fresh Element (click to expand)
Each Feeder has the following entities:
Entity Entity Type Additional Comments
Cancel manual feed Button - Only available if your feeder is online (connected to PetKit's servers).
- Will cancel a manual feeding that is currently in progress.
Indicator light Switch Only available if your feeder is online (connected to PetKit's servers).
Manual feed Number - Allows setting the amount of food (grams) to dispense immediately.
- Only available if your feeder is online (connected to PetKit's servers).
Desiccant days remaining Sensor Number of days left before the desiccant needs to be replaced.
Food level Binary Sensor Allows for determining if there is a food shortage.
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).
Start calibration Button See note at the bottom of the table for description provided by PetKit.
Stop calibration Button
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.
Food Left Sensor Identifies the amount of food, as a percentage, left in 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.

Feeder Calibration: Calibration is required after every installation and removal of batteries from the feeder. Prior to calibration, be sure to clean out all of the food from the feeder as the calibration process will empty any food that is left in the feeder.

Water Fountains


Eversweet 3 Pro/5 Mini/Solo 2 (click to expand)
Each water fountain has the following entities:
Entity Entity Type Additional Comments
Do not disturb Switch -Only available if BLE relay is set up and main BLE relay device is online.
- Allows for enabling or disabling do not disturb - Use PetKit app to set do not disturb schedule if you plan on using this entity.
Light Switch Only available if BLE relay is set up and main BLE relay device is online.
Power Switch -Only available if BLE relay is set up and main BLE relay device is online.
- Turning power off is equivalent to "Pause" in the PetKit app.
- Turning power on resumes the water fountain in the mode (Normal/Smart) it was in prior to being powered off.
Filter Sensor Indicates % filter life left.
Water level Binary Sensor Indicates if water needs to be added to the water fountain.
Light brightness Select -Only available if BLE relay is set up and main BLE relay device is online.
- Only available when light is turned on
Mode Select -Only available if BLE relay is set up and main BLE relay device is online.
- Allows setting mode to Normal or Smart.
- For "Smart mode", use the PetKit app to set the water on and off minutes.
Reset filter Button Only available if BLE relay is set up and main BLE relay device is online.
Energy usage Sensor
Last data update Sensor - Date/Time that the water fountain last reported updated data to PetKit servers.
- This can be used to track and identify if the BLE relay is working correctly as this will change whenever the main BLE relay device polls the water fountain.
- If you have the BLE relay set up, this sensor is only concerning if it shows data was updated hours ago.
Purified water today Sensor Number of times water has been purified.

Note About Water Fountain Control

If you have the BLE relay set up in the PetKit app and the main BLE relay device is online, sometimes the bluetooth connection will fail when attempting to send a command (e.g., changing mode, light brightness, etc) . If this happens, it will be noted in the Home Assistant logs. Retrying the command usually results in a subsequent successful connection.

Litter Boxes


Pura X (click to expand)
Each litter box has the following entities:
Entity Entity Type Additional Comments
Odor removal Button - Activates immediate odor removal
- Only available if litter box is online (Connected to PetKit's servers).
Pause Cleaning Button Only available if litter box is online (Connected to PetKit's servers).
Power Button - Turn litter box on/off
- Only available if litter box is online (Connected to PetKit's servers).
Start/Resume cleaning Button - Start a manual cleaning or resume a cleaning if litter box is currently paused.
- Only available if litter box is online (Connected to PetKit's servers).
Average Use Sensor Average use duration of the litter box today.
Deodorizer Binary Sensor Allows for determining if deodorizer needs to be refilled.
Last used by Sensor Indicates which cat used the litter box last.
Litter Binary Sensor Allows for determining if the litter needs to be refilled.
Times used Sensor Number of times litter box was used today.
Total use Sensor Total number of seconds litter box was used today.
Waste bin Binary Sensor Allows for determining if the waste bin is full.
Auto cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Kitten Mode is turned on.
Auto odor removal Switch Only available if litter box is online (Connected to PetKit's servers).
Avoid repeat cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Kitten Mode is turned on.
Child lock Switch Only available if litter box is online (Connected to PetKit's servers).
Cleaning delay Number - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Kitten Mode is turned on.
Cleaning interval Select - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Avoid repeat cleaning is disabled.
- Not available if Kitten Mode is turned on.
Display Switch - Turn display on litter box on or off.
- Only available if litter box is online (Connected to PetKit's servers).
Do not disturb Switch Only available if litter box is online (Connected to PetKit's servers).
Kitten mode Switch Only available if litter box is online (Connected to PetKit's servers).
Light weight cleaning disabled Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Avoid repeat cleaning is disabled.
- Not available if Kitten Mode is turned on.
Litter type Select Type of litter that is being used in the litter box.
Periodic cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Kitten Mode is turned on.
Periodic odor removal Switch Only available if litter box is online (Connected to PetKit's servers).
Deodorizer level Sensor Percent of deodorizer remaining.
Error Sensor Any errors being reported by the litter box.
Last event Sensor - Last event that occured in the litter box.
- sub_events attribute is used to list any events that are associated with the main event.
- This sensor is used to mimic the timeline that is seen in the PetKit app.
- Please see "Last event states" section below
Litter level Sensor Percent of litter that is left in the litter box.
Litter weight Sensor - Weight of litter currently in litter box.
- By default this is in Kg. The unit can be changed in the settings of this entity.
Manually paused Binary Sensor Indicates if the litter box has been manually paused or not. Please see note below table for additional information.
RSSI Sensor WiFi connection strength.

When manually pausing the litter box, the manually paused sensor entity will show a state of On. If cleaning isn't resumed, the litter box will (by default) resume cleaning after 10 minutes - the manually paused entity will return to a state of Off. If you manually pause a cleaning and restart Home Assistant while the litter box is paused, this sensor will have an incorrect state of Off. This is a limitation on PetKit's end as the state of the litter box is not reported by their servers. This behavior is evident when a cleaning is paused from the PetKit app, the app is force closed, and opened again. The goal of this entity is to be able to manually keep track of the state of the litter box since PetKit doesn't do that.

Last event states (click to expand)
The following are all possible event/sub event states and their full descriptions:
Event/Sub event state Full Description
no_events_yet No events yet
event_type_unknown Event type unknown
cleaning_completed Cleaning completed
dumping_over Dumping Over
reset_over Reset over
spray_over Spray over
pet_out Pet out
auto_cleaning_completed Auto cleaning completed
periodic_cleaning_completed Periodic cleaning completed
manual_cleaning_completed Manual cleaning completed
auto_cleaning_terminated Automatic cleaning terminated
periodic_cleaning_terminated Periodic cleaning terminated
manual_cleaning_terminated Manual cleaning terminated
auto_cleaning_failed_full Automatic cleaning failed, waste collection bin is full, please empty promptly
auto_cleaning_failed_hall_l Automatic cleaning failure, the cylinder is not properly locked in place, please check
auto_cleaning_failed_hall_t Automatic cleaning failure, the litter box's upper cupper cover is not placed properly, please check
scheduled_cleaning_failed_full Scheduled cleaning failed, waste collection bin is full, please empty promptly
scheduled_cleaning_failed_hall_l Scheduled cleaning failure, the cylinder is not properly locked in place, please check
scheduled_cleaning_failed_hall_t Scheduled cleaning failure, the litter box's upper cupper cover is not placed properly, please check
manual_cleaning_failed_full Manual cleaning failed, waste collection bin is full, please empty promptly
manual_cleaning_failed_hall_l Manual cleaning failure, the cylinder is not properly locked in place, please check
manual_cleaning_failed_hall_t Manual cleaning failure, the litter box's upper cupper cover is not placed properly, please check
auto_cleaning_canceled Automatic cleaning canceled, device in operation
periodic_cleaning_canceled Periodic cleaning canceled, device in operation
manual_cleaning_canceled Manual cleaning canceled, device in operation
auto_cleaning_canceled_kitten Kitten mode is enabled, auto cleaning is canceled
periodic_cleaning_canceled_kitten Kitten mode is enabled, periodically cleaning is canceled
litter_empty_completed Cat litter empty completed
litter_empty_terminated Cat litter empty terminated
litter_empty_failed_full Cat litter empty failed, waste collection bin is full, please empty promptly
litter_empty_failed_hall_l Cat litter empty failure, the cylinder is not properly locked in place, please check
litter_empty_failed_hall_t Cat litter empty failure, the litter box's cupper cover is not placed properly, please check
reset_completed Device reset completed
reset_terminated Device reset terminated
reset_failed_full Device reset failed, waste collection bin is full, please empty promptly
reset_failed_hall_l Device reset failure, the cylinder is not properly locked in place, please check
reset_failed_hall_t Device reset failure, the litter box's cupper cover is not placed properly, please check
deodorant_finished Deodorant finished
periodic_odor_completed Periodic odor removal completed
manual_odor_completed Manual odor removal completed
deodorant_finished_liquid_lack Deodorant finished, not enough purifying liquid, please refill in time
periodic_odor_completed_liquid_lack Periodic odor removal completed, not enough purifying liquid, please refill in time
manual_odor_completed_liquid_lack Manual odor removal completed, not enough purifying liquid, please refill in time
auto_odor_failed Automatic odor removal failed, odor eliminator error
periodic_odor_failed Periodic odor removal failure, odor eliminator malfunction
manual_odor_failed Manual odor removal failure, odor eliminator malfunction
no_sub_events No associated sub events
Pura MAX (click to expand)
Each litter box has the following entities:
Entity Entity Type Additional Comments
Dump litter Button
- Only available if litter box is online (Connected to PetKit's servers).
Exit maintenance mode Button
- Only available if litter box is online (Connected to PetKit's servers).
Odor removal Button - Activates immediate odor removal
- Only available if litter box is online (Connected to PetKit's servers).
Pause cleaning Button Only available if litter box is online (Connected to PetKit's servers).
Pause exiting maintenance mode Button Only available if litter box is online (Connected to PetKit's servers).
Pause litter dumping Button Only available if litter box is online (Connected to PetKit's servers).
Power Button - Turn litter box on/off
- Only available if litter box is online (Connected to PetKit's servers).
Reset N50 odor eliminator Button
Reset Pura Air liquid Button Only available if litter box has a Pura Air associated with it
Resume exiting maintenance mode Button Only available if litter box is online (Connected to PetKit's servers).
Resume litter dumping Button Only available if litter box is online (Connected to PetKit's servers).
Start maintenance mode Button Only available if litter box is online (Connected to PetKit's servers).
Start/Resume cleaning Button - Start a manual cleaning or resume a cleaning if litter box is currently paused.
- Only available if litter box is online (Connected to PetKit's servers).
Turn light ON Button Only available if litter box has a Pura Air associated with it.
Average Use Sensor Average use duration of the litter box today.
Last used by Sensor Indicates which cat used the litter box last.
Litter Binary Sensor Allows for determining if the litter needs to be refilled.
Pura Air liquid Binary Sensor - Allows for determining if the Pura Air liquid needs to be refilled.
- Only available if litter box has a Pura Air associated with it
Times used Sensor Number of times litter box was used today.
Total use Sensor Total number of seconds litter box was used today.
Waste bin Binary Sensor Allows for determining if the waste bin is full.
Auto cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Kitten Mode is turned on.
Auto odor removal Switch Only available if litter box is online (Connected to PetKit's servers).
Avoid repeat cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Kitten Mode is turned on.
Child lock Switch Only available if litter box is online (Connected to PetKit's servers).
Cleaning delay Number - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Kitten Mode is turned on.
Cleaning interval Select - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Avoid repeat cleaning is disabled.
- Not available if Kitten Mode is turned on.
Continuous rotation Switch - Only available if litter box is online (Connected to PetKit's servers).
Deep cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Avoid repeat cleaning is disabled.
- Not available if Kitten Mode is turned on.
Deep deodorization Switch - Only available if litter box is online (Connected to PetKit's servers) and has a Pura Air associated with it.
- Not available if Auto Cleaning is disabled.
- Not available if Avoid repeat cleaning is disabled.
- Not available if Kitten Mode is turned on.
Display Switch - Turn display on litter box on or off.
- Only available if litter box is online (Connected to PetKit's servers).
Do not disturb Switch Only available if litter box is online (Connected to PetKit's servers).
Kitten mode Switch Only available if litter box is online (Connected to PetKit's servers).
Light weight cleaning disabled Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Auto Cleaning is disabled.
- Not available if Avoid repeat cleaning is disabled.
- Not available if Kitten Mode is turned on.
Litter type Select Type of litter that is being used in the litter box.
Periodic cleaning Switch - Only available if litter box is online (Connected to PetKit's servers).
- Not available if Kitten Mode is turned on.
Periodic odor removal Switch Only available if litter box is online (Connected to PetKit's servers).
Error Sensor Any errors being reported by the litter box.
Last event Sensor - Last event that occured in the litter box.
- sub_events attribute is used to list any events that are associated with the main event.
- This sensor is used to mimic the timeline that is seen in the PetKit app.
- Please see "Last event states" section below
Litter level Sensor Percent of litter that is left in the litter box.
Litter weight Sensor - Weight of litter currently in litter box.
- By default this is in Kg. The unit can be changed in the settings of this entity.
N50 odor eliminator Sensor - Amount of days left before N50 filter needs to be replaced.
Pura Air battery Sensor - Only available if litter box has a Pura Air associated with it
Pura Air liquid Sensor - Only available if litter box has a Pura Air associated with it.
- Amount of liquid left in the Pura Air
RSSI Sensor WiFi connection strength.
State Sensor - Current work state of the litter box.
- Please see "State entity states" section below.
Last event states (click to expand)
The following are all possible event/sub event states and their full descriptions:
Event/Sub event state Full Description
no_events_yet No events yet
event_type_unknown Event type unknown
cleaning_completed Cleaning completed
dumping_over Dumping Over
reset_over Reset over
spray_over Spray over
light_over Light over
pet_out Pet out
auto_cleaning_completed Auto cleaning completed
periodic_cleaning_completed Periodic cleaning completed
manual_cleaning_completed Manual cleaning completed
auto_cleaning_terminated Automatic cleaning terminated
periodic_cleaning_terminated Periodic cleaning terminated
manual_cleaning_terminated Manual cleaning terminated
auto_cleaning_failed_full Automatic cleaning failed, waste collection bin is full, please empty promptly
auto_cleaning_failed_hall_t Automatic cleaning failure, the litter box's upper cupper cover is not placed properly, please check
auto_cleaning_failed_falldown Automatic cleaning failure, the litter box has been knocked down, please check.
auto_cleaning_failed_other Automatic cleaning failure, device malfunction, please check.
scheduled_cleaning_failed_full Scheduled cleaning failed, waste collection bin is full, please empty promptly
scheduled_cleaning_failed_hall_t Scheduled cleaning failure, the litter box's upper cupper cover is not placed properly, please check
scheduled_cleaning_failed_falldown Scheduled cleaning failure, the litter box has been knocked down, please check.
scheduled_cleaning_failed_other Scheduled cleaning failure, device malfunction, please check.
manual_cleaning_failed_full Manual cleaning failed, waste collection bin is full, please empty promptly
manual_cleaning_failed_hall_t Manual cleaning failure, the litter box's upper cupper cover is not placed properly, please check
manual_cleaning_failed_falldown Manual cleaning failure, the litter box has been knocked down, please check.
manual_cleaning_failed_other Manual cleaning failure, device malfunction, please check.
auto_cleaning_canceled Automatic cleaning canceled, device in operation
periodic_cleaning_canceled Periodic cleaning canceled, device in operation
manual_cleaning_canceled Manual cleaning canceled, device in operation
auto_cleaning_failed_maintenance Automatic cleaning failed, the device is in maintenance mode
periodic_cleaning_failed_maintenance Periodically cleaning failed, the device is in maintenance mode
auto_cleaning_canceled_kitten Kitten mode is enabled, auto cleaning is canceled
periodic_cleaning_canceled_kitten Kitten mode is enabled, periodically cleaning is canceled
litter_empty_completed Cat litter empty completed
litter_empty_terminated Cat litter empty terminated
litter_empty_failed_full Cat litter empty failed, waste collection bin is full, please empty promptly
litter_empty_failed_hall_t Cat litter empty failure, the litter box's cupper cover is not placed properly, please check
litter_empty_failed_falldown Cat litter empty failure, the litter box has been knocked down, please check
litter_empty_failed_other Cat litter empty failure, device malfunction, please check.
reset_completed Device reset completed
reset_terminated Device reset terminated
reset_failed_full Device reset failed, waste collection bin is full, please empty promptly
reset_failed_hall_t Device reset failure, the litter box's cupper cover is not placed properly, please check
reset_failed_falldown Device reset failure, the litter box has been knocked down, please check.
reset_failed_other Device reset failure, device malfunction, please check.
maintenance_mode Maintenance mode
deodorant_finished Deodorant finished
periodic_odor_completed Periodic odor removal completed
manual_odor_completed Manual odor removal completed
auto_odor_terminated Automatic odor removal has been terminated.
periodic_odor_terminated Periodic odor removal terminated.
manual_odor_terminated Manual odor removal terminated.
auto_odor_failed Automatic odor removal failed, odor eliminator error
periodic_odor_failed Periodic odor removal failure, odor eliminator malfunction
manual_odor_failed Manual odor removal failure, odor eliminator malfunction
auto_odor_canceled Automatic odor removal has been canceled, the device is running.
periodic_odor_canceled Periodic odor removal canceled. Litter Box is working.
manual_odor_canceled Manual odor removal canceled. Litter Box is working.
auto_odor_failed_device Automatic odor removal failed, no smart spray is connected.
periodic_odor_failed_device Periodic odor removal failed. Odor Removal Device disconnected.
manual_odor_failed_device Manual odor removal failed. Odor Removal Device disconnected.
auto_odor_failed_batt Automatic odor removal failed, please confirm that the battery of smart spray is sufficient.
periodic_odor_failed_batt Periodic odor removal failed. Please make sure the Odor Removal Device has sufficient battery.
manual_odor_failed_batt Manual odor removal failed. Please make sure the Odor Removal Device has sufficient battery.
auto_odor_failed_low_batt Automatic odor removal failed, battery is low.
periodic_odor_failed_low_batt Periodic odor removal failed. Odor Removal Device battery low.
manual_odor_failed_low_batt Manual odor removal failed. Odor Removal Device battery low.
cat_stopped_odor Your cat is using the litter box, deodorization has been canceled
light_on The light is ON
light_already_on The light is on. There is no need to turn on again.
light_malfunc Failing to turn on the light. Device malfunction, please check.
light_no_device Failing to turn on the light. Please bind the odor removal device first.
light_batt_cap Failing to turn on the light. Please check the battery capacity of the odor removal device.
light_low_batt Failing to turn on the light. Low battery capacity of odor removal device.
no_sub_events No associated sub events
State entity states (click to expand)
The following are all possible State entity states and their full descriptions:
State Full Description
cleaning_litter_box Cleaning litter box
cleaning_litter_box_paused Litter box cleaning paused
cleaning_paused_pet_entered Litter box cleaning paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP.
cleaning_paused_system_error Litter box cleaning paused: System error, operation paused
cleaning_paused_pet_approach Litter box cleaning paused: Your cat is approaching, operation paused
cleaning_paused_pet_using Litter box cleaning paused: Your cat is using the device, operation paused
resetting_device Resetting device
litter_box_paused Litter box paused
paused_pet_entered Litter box paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP.
paused_system_error Litter box paused: System error, operation paused
paused_pet_approach Litter box paused: Your cat is approaching, operation paused
paused_pet_using Litter box paused: Your cat is using the device, operation paused
dumping_litter Dumping cat litter
dumping_litter_paused Dumping cat litter paused
dumping_paused_pet_entered Dumping cat litter paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP.
dumping_paused_system_error Dumping cat litter paused: System error, operation paused
dumping_paused_pet_approach Dumping cat litter paused: Your cat is approaching, operation paused
dumping_paused_pet_using Dumping cat litter paused: Your cat is using the device, operation paused
resetting Resetting
leveling Leveling cat litter, please wait.
calibrating Calibrating litter box, please wait.
maintenance_mode In maintenance mode
maintenance_paused_pet_entered Maintenance mode paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP.
maintenance_paused_cover Maintenance mode paused: The top cover is not installed, operation paused
maintenance_paused_system_error Maintenance mode paused: System error, operation paused
maintenance_paused_pet_approach Maintenance mode paused: Your cat is approaching, operation paused
maintenance_paused_pet_using Maintenance mode paused: Your cat is using the device, operation paused
maintenance_paused Maintenance mode paused
exit_maintenance Exiting maintenance mode
maintenance_exit_paused_pet_entered Maintenance mode exiting paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP.
maintenance_exit_paused_cover Maintenance mode exiting paused: The top cover is not installed, operation paused
maintenance_exit_paused_system_error Maintenance mode exiting paused: System error, operation paused
maintenance_exit_paused_pet_approach Maintenance mode exiting paused: Your cat is approaching, operation paused
maintenance_exit_paused_pet_using Maintenance mode exiting paused: Your cat is using the device, operation paused
maintenance_exit_paused Maintenance mode exiting paused
idle Idle

Purifiers


Air Magicube (click to expand)
Each purifier has the following entities:
Entity Entity Type Additional Comments
Indicator light Switch Only available if your purifier is online (connected to PetKit's servers)
Prompt tone Switch Only available if your purifier is online (connected to PetKit's servers).
Purifier Fan - Only available if purifier is online (Connected to PetKit's servers).
- Can turn the purifier On and Off and view/change the current mode to one of the following: auto, silent, standard, strong.
Air purified Sensor
Humidity Sensor
Temperature Sensor
Error Sensor Displays any error messages. Note: Even though it isn't really an error, An error message is displayed by PetKit if the purifier is in standby mode.
Liquid Sensor Percent of purifying liquid that remains in the purifier.
RSSI Sensor WiFi connection strength.

Pets


Dog (click to expand)
Entity Entity Type Additional Comments
Set weight Number Set the weight of the dog.
Cat (click to expand)
Entity Entity Type Additional Comments
Set weight Number Set the weight of the cat.
Last use duration Sensor - Amount of time spent in the litter box during last use today.
- Only available if PetKit account has litter box(es).
- If multiple litter boxes, this will display data obtained from the most recent litter box used.
Latest weight Sensor - Most recent weight measurement obtained during last litter box use today.
- Only available if PetKit account has litter box(es).
- If multiple litter boxes, this will display data obtained from the most recent litter box used.
- By default the unit used is Kg. Unit can be changed in the settings of the entity.

Help With Translations

A simple way of contributing to this integration is by helping translate the entity names and states to other languages.

If you speak another language, and would like to help:

  1. Inside of custom_components/petkit/translations, you will find two files: en.json and hr.json.
  2. Create a new file and title it based on the 639-1 language code you are creating a translation for in the format <language_code>.json.
  3. Copy the contents from the en.json file to your newly created file.
  4. If you are unsure what needs to be translated from english to the target language, compare the en.json file to the hr.json to see what was translated.
  5. Create a PR with your new language file placed in the translations directory.

home-assistant-petkit's People

Contributors

lachezar-gizdov avatar robertd502 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

home-assistant-petkit's Issues

Pura Max

Hi Robert and thank you SO MUCH for your work. I managed to install, despite not knowing Ha, your integration. it accepts my credentials but I can't find anything in entity, only now I think I understand that this is due to the fact that I have a pure max. is it correct in your opinion? do you plan to release an update soon? is this why i can't find entities on Ha? thank you very much!!!

Adding Petkit pura max

Hello, I have a Petkit pura max. I was hoping that it would also be recognized because it has the same functions as the Petkit pura x. But unfortunately she is not found. I only get one device for my cat. Is it possible to add the Petkit pura max? Would be really great.

Avatar URLs

Hi there

Thank you so much for making this and this is something that I've been waiting for so long!

Just a quick question about my pet's avatar, is it possible to script the avatar to use https instead of http?

I am getting this and I tried to add http(s) and the picture loads too.

image

On the other hand, is there a way to keep weight history? The value seems reset every once in a while, and I'd like to always know what is the last measured weight of my cats.

Feeding schedule

Hi,

Is feeding plan/schedule (that will be programmed onto device) on the roadmap? I know that can use HA automation to achieve similar results but such scenario creates IMO to many parts that can fail.

If this matters I'm using Fresh Element Solo

Regards,
Adam

Failed to login (EU region)

Hi my account is an EU regions and when I try to login via hass integration, I got this error:
! Unknown error occurred

I did not check asia or china account checkboxes.

Logger: aiohttp.server
Source: deps/lib/python3.11/site-packages/petkitaio/petkit_client.py:403
First occurred: 13:53:27 (1 occurrences)
Last logged: 13:53:27

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 297, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 393, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/petkit/config_flow.py", line 118, in async_step_user
    await async_validate_api(self.hass, email, password, asia_account, china_account)
  File "/config/custom_components/petkit/util.py", line 30, in async_validate_api
    devices_query = await client.get_device_roster()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 176, in get_device_roster
    device_roster = await self._post(url, header, data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 403, in _post
    async with self._session.post(url, headers=headers, data=data, timeout=self.timeout) as resp:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 558, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 670, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 129, in write_headers
    buf = _serialize_headers(status_line, headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_writer.pyx", line 132, in aiohttp._http_writer._serialize_headers
  File "aiohttp/_http_writer.pyx", line 109, in aiohttp._http_writer.to_str
TypeError: Cannot serialize non-str key None

TZ issue

Hey @RobertD502 ,

Thanks for this.

I'm a bit of a noob at python, but i had a look through the code and cannot see where it might be getting stuck.

Not sure if its something to do with my location but i seem to have everything required set..

i'm running HA in a container on my QNAP.
installed HACS user this method:
image
have environment variables set:
inside container terminal
image
in container settings within QNAP:
image
Timezone is set in HA:
image

Logs:
2023-09-13 05:12:10.033 ERROR (MainThread) [custom_components.petkit] A timezone could not be found. If you are running Home Assistant as a standalone Docker container, you must define the TZ environmental variable.

let me know if you need any more details or how i can further troubleshoot.

Can't talk to water fountain

I am seeing this in the logs consistently:

2023-05-12 21:57:31.342 WARNING (MainThread) [custom_components.petkit] Got petkit device detail for Cat Water failed: {'error': {'code': 97, 'msg': 'App is out of date, please upgrade'}}

Yumshare Compatibility - Upgraded Gemini

So the new Yumshare Dual Hopper shipped, and we just got it in and set up. Currently it's not compatible with the integration, but as it's essentially an upgraded version of a Gemini, I was hoping it would be possible to expand the same feature set to it without much effort. Either way, thank you for your work on this integration, it's been a huge help.

Integration doesn't load, possibly from a migration to docker?

I wish I had taken look at my integrations page before migrating from supervisor to docker to see if the Petkit integration was actually working. I've gone through and uninstalled/reinstalled the integration through HACS, deleted the devices and tried to readd them/relogin. Here's what I get out of my logs:

2023-08-14 13:58:50.228 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 296, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 392, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/petkit/config_flow.py", line 118, in async_step_user
    await async_validate_api(self.hass, email, password, region)
  File "/config/custom_components/petkit/util.py", line 29, in async_validate_api
    devices_query = await client.get_device_roster()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 192, in get_device_roster
    device_roster = await self._post(url, header, data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 419, in _post
    async with self._session.post(url, headers=headers, data=data, timeout=self.timeout) as resp:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 558, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 670, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 129, in write_headers
    buf = _serialize_headers(status_line, headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_writer.pyx", line 132, in aiohttp._http_writer._serialize_headers
  File "aiohttp/_http_writer.pyx", line 109, in aiohttp._http_writer.to_str
TypeError: Cannot serialize non-str key None

Thank you.

Unknown error occurred

After installing this I keep getting the following error

I'm logged out on every mobile device that used the petkit account before,

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/petkit/util.py:28
Integration: PetKit (documentation, issues)
First occurred: 14:04:24 (2 occurrences)
Last logged: 14:07:00

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 145, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 253, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/petkit/config_flow.py", line 90, in async_step_user
    await async_validate_api(self.hass, email, password)
  File "/config/custom_components/petkit/util.py", line 28, in async_validate_api
    devices_query = await client.get_device_roster()
  File "/usr/local/lib/python3.10/site-packages/petkitaio/petkit_client.py", line 143, in get_device_roster
    device_roster = await self._post(url, header, data)
  File "/usr/local/lib/python3.10/site-packages/petkitaio/petkit_client.py", line 345, in _post
    async with self._session.post(url, headers=headers, data=data, timeout=self.timeout) as resp:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 557, in _request
    resp = await req.send(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 669, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    buf = _serialize_headers(status_line, headers)
  File "aiohttp/_http_writer.pyx", line 132, in aiohttp._http_writer._serialize_headers
  File "aiohttp/_http_writer.pyx", line 109, in aiohttp._http_writer.to_str
TypeError: Cannot serialize non-str key None

Virtual Machine without TZ variable

Hello.
I've trying to setup PetKit but got well known issue regarding timezone TZ variable
I've setup HassOS on virtual machine on Proxmox and don't have any TZ variable on it. Just a regula Home assistant operation system.
How I can fix an issue?
I already tried to create manual file with timezone (like on a pure debian) and TZ variable but without luck.

Devices offline

Hi,

I just found out all my devices are offline and not updating anymore.
Enabled debugging, nothing really to be found.
Reloaded the integration and restarted HA (2023.7.3) already.

The app is still working without issues and devices report as online.

Maybe others have the same issues?

very sporadic updates

Hi there

first of all many thanks for this niece piece of software. I have a Petkit Eversweet 3 Pro. I dont own any Petkit smart feeder which acts as a BLE-gateway. I installed your integration and it works well so far. I created two accounts in the Petkit app. One for the integration with HA. From this account I shared the device to the second account which I am using inside the app.

Now to my question: The filter and water-level only get updated when I open the app and wait like 1-2 minutes. If I dont open the app, these sensors dont get updated. For example when I dont open the app for 1 week, the sensor called "last data update" shows the last update 1 week ago and nor the filter or water-level sensors get updated.

The sensor for the purified water and energy-usage however get updated like every 5 hours or so.

Is this an expected behaviour due to the way the app works?

Petkit Eversweet 3 Pro firmware 2.49
Petkit integration v0.1.10

HA
Core 2024.1.5
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0

all the best

Andrew

Add support for Fresh Element Gemini

I own a Fresh Element Gemini, which is pretty much the same as Fresh Element Solo, the difference is that has a different id and thus doesn't show up on the integration (id: 'd4s')... I was about to create a collaboration by opening a PR on this repo and at petkitaio repo but I'm not able to... I've made all the changes locally but since I don't have access to petkitaio it still doesn't work

Litter level & weight always zero

Hi,

thank you for this integration. It works well so far but i noticed that the litter level and weight is always 0%/KG even if i refill the litter box.

There is one log error but i dont know if its related to this bug.

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 243, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in _async_write_ha_state
    state, attr = self._async_generate_attributes()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in _async_generate_attributes
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 751, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 501, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/petkit/sensor.py", line 2874, in native_value
    if work_state['petInTime'] == 0:
       ~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'petInTime'

Battery state and status - Infinity Feeder

Hello!

First want to say this integration is awesome, and is what drove me to purchase this product, to replace an older Petwant smart feeder with no external connectivity, as well as a terrible app.

I noticed the battery state it not filling in HA, although the unit it-self mentions having an internal battery, and the users guide shows that the LEDs are indicating it working properly.

Is this a limitation for this product specifically (that other models may not have issues with), or has something happened in updates that caused the battery status to no longer sync properly?

Thanks!

image

Pet weight rounded on pura max

Hi,

for some reason the sensor for my cats weight is rounded since a few days ago (3400g, 3800g, etc).

Screenshot_20231223-210503

Do you have any hint? I am attaching the debug log.

2023-12-21 06:22:43.428 DEBUG (MainThread) [custom_components.petkit] Found the following PetKit devices/pets: PetKitData(user_id='xx', feeders={}, litter_boxes={100019620: LitterBox(id=100019620, device_detail={'id': xxx, 'mac': 'xx', 'sn': 'xx', 'secret': 'xx', 'createdAt': '2022-11-25T11:18:18.029+0000', 'name': 'PETKIT PURA MAX', 'hardware': 1, 'firmware': '1.456', 'firmwareDetails': [{'module': 'userbin', 'version': 2310010}, {'module': 'pics', 'version': 2220001}, {'module': 'lans', 'version': 2245001}], 'timezone': 1.0, 'signupAt': '2023-12-19T08:49:05.573+0000', 'locale': 'Europe/Rome', 'user': {'id': 'xxx', 'nick': 'xxxx', 'gender': 2, 'avatar': 'http://sandbox.img5.petkit.cn/banner/2022/10/13/6347d75a44ad08000b011e7dDzwc693i5', 'point': {'honour': 'LV0', 'rank': 0, 'growth': 17, 'icon': 'http://img5-us.petkit.cn/misc/point/n0', 'icon2': 'http://img5-us.petkit.cn/misc/point/l0', 'startGrowth': 0, 'endGrowth': 50}}, 'shareOpen': 1, 'autoUpgrade': 1, 'relation': {'userId': '100454792'}, 'withK3': 1, 'k3Id': 100028385, 'btMac': 'xxx', 'settings': {'litterFullNotify': 1, 'lackSandNotify': 1, 'workNotify': 0, 'petInNotify': 0, 'lackLiquidNotify': 1, 'deodorantNotify': 1, 'sandType': 2, 'manualLock': 0, 'lightMode': 1, 'lightRange': [0, 1440], 'autoWork': 1, 'fixedTimeClear': 0, 'fixedTimeRefresh': 0, 'downpos': 1, 'deepRefresh': 0, 'weightPopup': 1, 'autoIntervalMin': 1800, 'stillTime': 120, 'unit': 0, 'language': 'en_US', 'languageFollow': 0, 'softMode': 0, 'avoidRepeat': 0, 'underweight': 0, 'kitten': 0, 'kittenTipsTime': 0, 'stopTime': 600, 'languages': ['zh_CN', 'zh_TW', 'en_US', 'es_ES', 'ko_KR', 'it_IT', 'ja_JP', 'pt_PT', 'de_DE', 'fr_FR', 'ru_RU'], 'kittenPercent': 0.8, 'dumpSwitch': 1, 'autoRefresh': 0, 'disturbMode': 0, 'disturbRange': [1320, 360], 'relateK3Switch': 1, 'lightest': 2720, 'deepClean': 0, 'lightConfig': 2, 'bury': 0, 'lightMultiRange': [[360, 1320]], 'disturbConfig': 2, 'distrubMultiRange': [[1200, 420]], 'controlSettings': 0}, 'k3Device': {'id': 100028385, 'mac': 'a4c1388410d8', 'sn': '20220326M40469', 'secret': '7d70a1b6b1ba', 'createdAt': '2022-11-25T11:19:30.000+0000', 'updateAt': '2023-12-21T03:01:21.000+0000', 'userId': '100454792', 'name': 'The Smart Spray', 'hardware': 1, 'firmware': 39, 'settings': {'liquidLackSwitch': 1, 'fixedTimeRefresh': 0}, 'timezone': 1.0, 'relation': {'userId': '100454792'}, 'relateT4': 100019620, 'battery': 90, 'liquid': 100, 'refreshing': -1, 'lighting': -1, 'voltage': 0, 'liquidLack': 3}, 'petOutTip': 1, 'multiConfig': True, 'state': {'wifi': {'ssid': 'xxxx', 'bssid': 'xxxx', 'rsq': -32}, 'pim': 1, 'ota': 0, 'overall': 1, 'sandCorrect': 0, 'liquidReset': 0, 'sandWeight': 5731, 'sandPercent': 89, 'usedTimes': 0, 'sandType': 2, 'sandStatus': 1, 'box': 0, 'liquid': 100, 'battery': 90, 'petInTime': 0, 'power': 1, 'petError': False, 'deodorantLeftDays': 13, 'liquidLack': False, 'boxFull': False, 'liquidEmpty': False, 'sandLack': False, 'lowPower': False}, 'lastOutTime': 28, 'petOutRecords': [[14151, 28]], 'inTimes': 1, 'totalTime': 3463, 'specialLitterAd': {'adDetailUrl': 'http://m.petkit.com/app/cat_litter.html', 'adSwitch': 0, 'adLinkUrl': 'https://m.tb.cn/h.f8XZ8IM?sm=846b3a', 'label': '跨年', 'labelUrl': 'http://sandbox.img5.petkit.cn/post/2021/12/7/61af3624a8c9cc16b23736e8ywX6LUO8P', 'labelName': '专用猫砂'}, 'maintenanceTime': 1702625399, 'petInTipLimit': 15}, device_record=[{'deviceId': xxx, 'eventType': 10, 'timestamp': 1703127379, 'content': {'timeIn': 1703127351, 'timeOut': 1703127379, 'autoClear': 1, 'interval': 2, 'petWeight': 3426}, 'enumEventType': 'pet_out', 'userId': 'xxx', 'petId': '100640035', 'subContent': [{'deviceId': xxx, 'eventType': 5, 'timestamp': 1703127680, 'content': {'startTime': 1703127501, 'startReason': 0, 'litterPercent': 89, 'box': 0, 'result': 0, 'boxFull': False}, 'enumEventType': 'clean_over', 'userId': '100454792', 'subContent': []}], 'avatar': 'http://img5-us.petkit.cn/pavatar/2022/11/26/63811ccd6a5dff000bec207dcgg89kmEi', 'petName': 'Nespola'}], statistics={'statisticTime': '20231221', 'totalTime': 28, 'times': 1, 'avgTime': 28, 'statisticInfo': [{'statisticDate': '20231221', 'petTimes': 1, 'petTotalTime': 28, 'petWeight': 3426, 'petId': 'xxx', 'petName': 'Nespola', 'xTime': 14151}], 'petIds': [{'id': 'xxx', 'name': 'Nespola'}]}, type='t4', manually_paused=False, manual_pause_end=None)}, water_fountains={}, pets={100640033: Pet(id='100640033', data={'activeDegree': 0, 'avatar': 'http://img5-us.petkit.cn/pavatar/2022/11/26/63811cb8b6fc7f000cef8a05EbNK27Txp', 'birth': '2013-07-20', 'category': {'avatar': 'http://img2.petkit.cn/dogavatar/ljm_-gPOorp5C4PK', 'id': 10042, 'name': 'Mix'}, 'createdAt': '2022-11-25T11:14:58.000Z', 'deviceCount': 0, 'emotion': 0, 'familyId': xxxx, 'femaleState': 2, 'gender': 2, 'id': 'xxxx', 'isRoyalCaninPet': 0, 'maleState': 0, 'name': 'Vaniglia', 'owner': {'deviceCount': 0, 'id': '100454792', 'petCount': 0, 'userCount': 0}, 'size': {'id': 1, 'name': 'Standard'}, 'states': [], 'type': {'id': 2, 'name': 'Cat'}, 'updatedAt': '2023-11-15T21:47:07.000Z', 'weight': 3.579, 'weightControl': 3, 'weightControlTips': {}, 'weightLabel': 'Normal'}, type='Cat'), 100640034: Pet(id='100640034', data={'activeDegree': 0, 'avatar': 'http://img5-us.petkit.cn/pavatar/2022/11/26/63811c9db6fc7f000cef8a02Kg3tlQBuN', 'birth': '2013-07-20', 'category': {'avatar': 'http://img2.petkit.cn/dogavatar/ljm_-gPOorp5C4PK', 'id': 10042, 'name': 'Mix'}, 'createdAt': '2022-11-25T11:16:21.000Z', 'deviceCount': 0, 'emotion': 0, 'familyId': 100454792, 'femaleState': 2, 'gender': 2, 'id': '100640034', 'isRoyalCaninPet': 0, 'maleState': 0, 'name': 'Cannella', 'owner': {'deviceCount': 0, 'id': '100454792', 'petCount': 0, 'userCount': 0}, 'size': {'id': 1, 'name': 'Standard'}, 'states': [], 'type': {'id': 2, 'name': 'Cat'}, 'updatedAt': '2023-12-20T14:12:06.000Z', 'weight': 3.919, 'weightControl': 3, 'weightControlTips': {}, 'weightLabel': 'Normal'}, type='Cat'), 100640035: Pet(id='100640035', data={'activeDegree': 0, 'avatar': 'http://img5-us.petkit.cn/pavatar/2022/11/26/63811ccd6a5dff000bec207dcgg89kmEi', 'birth': '2013-06-21', 'category': {'avatar': 'http://img2.petkit.cn/dogavatar/ljm_-gPOorp5C4PK', 'id': 10042, 'name': 'Mix'}, 'createdAt': '2022-11-25T11:16:57.000Z', 'deviceCount': 0, 'emotion': 0, 'familyId': 100454792, 'femaleState': 2, 'gender': 2, 'id': '100640035', 'isRoyalCaninPet': 0, 'maleState': 0, 'name': 'Nespola', 'owner': {'deviceCount': 0, 'id': '100454792', 'petCount': 0, 'userCount': 0}, 'size': {'id': 1, 'name': 'Standard'}, 'states': [], 'type': {'id': 2, 'name': 'Cat'}, 'updatedAt': '2023-12-20T05:51:10.000Z', 'weight': 3.4, 'weightControl': 3, 'weightControlTips': {}, 'weightLabel': 'Normal'}, type='Cat')}, purifiers={})
2023-12-21 06:22:43.428 DEBUG (MainThread) [custom_components.petkit] Finished fetching petkit data in 0.875 seconds (success: True)

Cannot Log in "The phone number is not registered"

Hello, can you help me what I'm doing wrong? It's first time I log in.

This error originated from a custom integration.

Logger: custom_components.petkit
Source: custom_components/petkit/util.py:41
Integration: PetKit (documentation, issues)

Unknown PetKit Error: PetKit Error 125: The phone number is not registered

PetKit Error 97: App is out of date, please upgrade

Hello,

since today i receive a message that the app is out of date.

Logger: custom_components.petkit
Quelle: helpers/update_coordinator.py:347
Integration: PetKit (Dokumentation, Probleme)
Erstmals aufgetreten: 08:35:15 (1 Vorkommnisse)
Zuletzt protokolliert: 08:35:15

Error fetching petkit data: PetKit Error 97: App is out of date, please upgrade

Issues on pura max

Hi @RobertD502 , since I added a Eversweet 3 fountain i'm experiencing issues with my pura max. Sometimes the cat litter just hangs, sometimes it restarts in the middle of a reset, sometimes it does not do the automatic cleaning. Sometimes it just shuts down and I have to unplug and plug it back to make it work. I honestly doubt that it's related to this integration, it seems more like a firmware issue or hardware problem.

Are you aware of any possible issue connected to BLE Relay and/or Pura Max like this ones?

Eversweet Max

Hi All

I just got an Eversweet Max and would love to get it working with the integration. Please let me know what I need to do to make it happen. I would be willing to donate to the effort.

Thanks!

#58

Add Russian translation

I translated the entire en.json file into Russian and named the file ru.json. I checked it myself. I uploaded the file along the path \custom_components\petkit\translations\ru.json and everything was translated for me. I don't know how to PR. Please add this to your integration. Thank you

ru.json
{
	"config": {
		"abort": {
			"already_configured": "Учётная запись Petkit уже настроена",
			"reauth_successful": "Повторная аутентификация прошла успешно"
		},
		"error": {
			"cannot_connect": "Не удалось подключиться",
			"invalid_auth": "Неверная аутентификация. Проверьте свои учётные данные",
			"no_devices": "В аккаунте не найдено ни одного устройства",
			"server_busy": "Серверы Petkit заняты. Пожалуйста, повторите попытку позже",
			"petkit_error": "Найдена неизвестная ошибка. Пожалуйста, обратитесь к   Home Assistant за дополнительной информацией",
			"region_error": "Пожалуйста, выберите страну, соответствующую вашей учётной записи",
			"timezone_error": "Не удалось найти часовой пояс. Если вы запускаете Home Assistant как автономный контейнер Docker, вы должны определить переменную среды TZ"
		},
		"step": {
			"user": {
				"data": {
					"email": "Укажите электронную почту от учетной записи Pet Kit",
					"password": "Укажите пароль от учетной записи Pet Kit",
					"region": "Выберите страну, связанную с вашей учетной записью",
					"polling_interval": "Интервал опроса (секунды)"
				},
				"title": "Заполните свои учетные данные PetKit"
			},
			"reauth_confirm": {
				"data": {
					"email": "Укажите электронную почту от учетной записи Pet Kit",
					"password": "Укажите пароль от учетной записи Pet Kit",
					"region": "Выберите страну, связанную с вашей учетной записью",
					"polling_interval": "Интервал опроса (секунды)"
				},
				"title": "Повторите аутентификацию с использованием ваших учетных данных PetKit"
			}
		}
	},
	"options": {
		"step": {
			"petkit_options": {
				"data": {
					"region": "Выберите страну, связанную с вашей учетной записью",
					"polling_interval": "Интервал опроса (секунды)"
				}
			}
		}
	},
	"entity": {
		"binary_sensor": {
			"water_level": {
				"name": "Уровень воды"
			},
			"food_level": {
				"name": "Уровень пищи"
			},
			"battery_installed": {
				"name": "Батарея установлена"
			},
			"battery": {
				"name": "Батарея"
			},
			"wastebin": {
				"name": "Мусорная корзина"
			},
			"litter": {
				"name": "Туалет"
			},
			"deodorizer": {
				"name": "Дезодорант"
			},
			"manually_paused": {
				"name": "Приостановлено вручную"
			},
			"pura_air_liquid": {
				"name": "Жидкость Pura Air"
			},
			"food_level_hopper_one": {
				"name": "Бункер для уровня продуктов 1"
			},
			"food_level_hopper_two": {
				"name": "Бункер для уровня продуктов 2"
			}
		},
		"button": {
			"reset_filter": {
				"name": "Сброс фильтра"
			},
			"reset_desiccant": {
				"name": "Сброс влагопоглотителя"
			},
			"cancel_manual_feed": {
				"name": "Отмена ручного кормления"
			},
			"call_pet": {
				"name": "Подозвать питомца"
			},
			"start_cleaning": {
				"name": "Начало/возобновление уборки"
			},
			"pause_cleaning": {
				"name": "Приостановление уборки"
			},
			"odor_removal": {
				"name": "Удаление запаха"
			},
			"reset_deodorizer": {
				"name": "Сброс дезодоранта"
			},
			"reset_pura_air_liquid": {
				"name": "Сброс жидкости Pure Air"
			},
			"n50_reset": {
				"name": "Сброс No 50 устранителя запаха"
			},
			"light_on": {
				"name": "Включение сигнала ON"
			},
			"start_maintenance": {
				"name": "Включение  режима обслуживания"
			},
			"exit_maintenance": {
				"name": "Выключение режима обслуживания"
			},
			"pause_exit_maintenance": {
				"name": "Приостановление режима обслуживания"
			},
			"resume_exit_maintenance": {
				"name": "Возобновление выхода из режима обслуживания"
			},
			"dump_litter": {
				"name": "Сброс мусора"
			},
			"pause_dump_litter": {
				"name": "Приостановление сброса мусора"
			},
			"resume_dump_litter": {
				"name": "Возобновление сброса мусора"
			},
			"food_replenished": {
				"name": "Корм пополнен"
			},
			"start_cal": {
				"name": "Начать калибровку"
			},
			"stop_cal": {
				"name": "Остановить калибровку"
			}
		},
		"fan": {
			"purifier": {
				"name": "PОчиститель",
				"state_attributes": {
					"preset_mode": {
						"state": {
							"auto": "Auto",
							"silent": "Silent",
							"standard": "Standard",
							"strong": "Strong"
						}
					}
				}
			}
		},
		"number": {
			"set_weight": {
				"name": "Установить вес"
			},
			"surplus": {
				"name": "Излишек"
			},
			"volume": {
				"name": "Громкость"
			},
			"manual_feed": {
				"name": "Кормление вручную"
			},
			"cleaning_delay": {
				"name": "Задержка уборки"
			},
			"min_eating_duration": {
				"name": "Минимальная продолжительность приёма пищи"
			}
		},
		"select": {
			"light_brightness": {
				"name": "Яркость света",
				"state": {
					"low": "Low",
					"medium": "Medium",
					"high": "High"
				}
			},
			"mode": {
				"name": "Режим",
				"state": {
					"normal": "Normal",
					"smart": "Smart"
				}
			},
			"manual_feed": {
				"name": "Кормление вручную"
			},
			"sound": {
				"name": "Звук"
			},
			"cleaning_interval": {
				"name": "Интервал уборки"
			},
			"litter_type": {
				"name": "Тип наполнителя",
				"state": {
					"bentonite": "Bentonite",
					"tofu": "Tofu",
					"mixed": "Mixed"
				}
			}
		},
		"sensor": {
			"energy_usage": {
				"name": "Использование энергии"
			},
			"last_data_update": {
				"name": "Последнее обновление данных"
			},
			"filter": {
				"name": "Фильтр"
			},
			"purified_water_today": {
				"name": "Очищенная вода сегодня"
			},
			"feeder_status": {
				"name": "Статус",
				"state": {
					"offline": "Offline",
					"normal": "Normal",
					"on_batteries": "On Batteries"
				}
			},
			"desiccant_days_remaining": {
				"name": "Осталось влагопоглотителя"
			},
			"battery_status": {
				"name": "Статус батареи",
				"state": {
					"normal": "Normal",
					"low": "Low"
				}
			},
			"dispensed": {
				"name": "Батарея разряжена"
			},
			"planned": {
				"name": "Запланированный"
			},
			"planned_dispensed": {
				"name": "Запланированная разрядка"
			},
			"manually_dispensed": {
				"name": "Разрядка вручную"
			},
			"times_dispensed": {
				"name": "Периоды разрядки батареи"
			},
			"rssi": {
				"name": "RSSI"
			},
			"amount_eaten": {
				"name": "Количество съеденного корма"
			},
			"times_eaten": {
				"name": "Количество приёмов корма"
			},
			"food_in_bowl": {

				"name": "Корм в миске"
			},
			"error": {
				"name": "Ошибка",
				"state": {
					"no_error": "Ошибки нет"
				}
			},
			"deodorizer_level": {
				"name": "Уровень дезодоранта"
			},
			"litter_level": {
				"name": "Уровень отходов"
			},
			"last_used_by": {
				"name": "Последнее использование",
				"state": {
					"no_record_yet": "Отсутствие записи",
					"unknown_pet": "Неизвестный питомец"
				}
			},
			"last_event": {
				"name": "Последнее событие",
				"state": {
					"no_events_yet": "No events yet",
					"event_type_unknown": "Тип события неизвестен",
					"cleaning_completed": "Очистка завершена",
					"dumping_over": "Сброс через",
					"reset_over": "Сброс настроек",
					"spray_over": "Распылить",
					"pet_out": "Выход питомца",
					"auto_cleaning_completed": " Автоуборка выполнена",
					"periodic_cleaning_completed": "Периодическая уборка завершена",
					"manual_cleaning_completed": "Ручная уборка выполнена",
					"auto_cleaning_terminated": "Автоматическая уборка выполнена",
					"periodic_cleaning_terminated": "Периодическая уборка выполнена",
					"manual_cleaning_terminated": "Ручная уборка выполнена",
					"auto_cleaning_failed_full": "Автоматическая уборка не состоялась, контейнер наполнен, пожалуйста, срочно очистите",
					"auto_cleaning_failed_hall_l": "Сбой авточистки, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
					"auto_cleaning_failed_hall_t": "Сбой авточистки,верхняя крышка чашки туалетного лотка установлена неправильно, пожалуйста, проверьте",
					"scheduled_cleaning_failed_full": "Плановая уборка не удалась, контейнер для мусора переполнен, пожалуйста, опорожните его скорее",
					"scheduled_cleaning_failed_hall_l": "Плановая уборка не удалась, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
					"scheduled_cleaning_failed_hall_t": "Сбой плановой уборки,верхняя крышка чашки туалетного лотка установлена неправильно, пожалуйста, проверьте",
					"manual_cleaning_failed_full": "Сбой ручной уборки, контейнер для мусора переполнен, пожалуйста, опорожните его скорее",
					"manual_cleaning_failed_hall_l": "Сбой ручной уборки, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
					"manual_cleaning_failed_hall_t": "Сбой ручной уборки, верхняя крышка чашки туалетного лотка установлена неправильно, пожалуйста, проверьте",
					"auto_cleaning_canceled": "Автоуборка отложена",
					"periodic_cleaning_canceled": "Периодическая уборка отменена,устройство в работе",
					"manual_cleaning_canceled": "Ручная уборка отменена, устройство в действии",
					"auto_cleaning_canceled_kitten": "Включён режим котёнок, автоуборка отменена",
					"periodic_cleaning_canceled_kitten": "Включён режим котёнок, периодическая уборка отменена",
					"litter_empty_completed": "Очистка кошачьего туалета выполнена",
					"litter_empty_terminated": "Очистка кошачьего туалета закончена",
					"litter_empty_failed_full": "Не удалось опорожнить наполнитель для кошачьего туалета, контейнер для сбора мусора заполнен, пожалуйста, опорожните его как можно скорее",
					"litter_empty_failed_hall_l": "Сбой очистки кошачьего туалета, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
					"litter_empty_failed_hall_t": "Сбой очистки кошачьего туалета, вершняя крышка чашки туалетного лотка установлена неправильно, пожалуйста, проверьте",
					"reset_completed": "Сброс устройства завершён",
					"reset_terminated": "Сброс устройства прекращён",
					"reset_failed_full": "Ошибка сброса устройства, контейнер для отходов переполнен, пожалуйста, опорожните его скорее",
					"reset_failed_hall_l": "Ошибка сброса устройства, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
					"reset_failed_hall_t": "Ошибка сброса  устройства, крышка чаши туалетного лотка установлена неправильно",
					"deodorant_finished": "Закончился дезодорант",
					"periodic_odor_completed": "Периодическое удаление запаха завершено",
					"manual_odor_completed": "Выполнено ручное удаление запаха",
					"deodorant_finished_liquid_lack": "Дезодорант закончился, недостаточно очищающей жидкости, пожалуйста, пополняйте во-время",
					"periodic_odor_completed_liquid_lack": "Периодическое удаление запаха завершено, недостаточно очищающей жидкости, пожалуйста, пополняйте во-время",
					"manual_odor_completed_liquid_lack": "Выполнено ручное удаление запаха, недостаточно очищающей жидкости, пожалуйста, пополняйте во-время",
					"auto_odor_failed": "Сбой автоматического удаления запаха, ошибка устранителя запаха",
					"periodic_odor_failed": "Сбой периодического удаления запаха, неисправность в устранителе запаха",
					"manual_odor_failed": "Сбой ручного удаления запаха, неисправность в устранителе запаха"
				},
				"state_attributes": {
					"sub_events": {
						"state": {
							"no_events_yet": "Пока нет события",
							"event_type_unknown": "Вид события неизвестен",
							"cleaning_completed": "Очистка завершена",
							"dumping_over": "Разгрузка",
							"reset_over": "Сброс ",
							"spray_over": "Распыление",
							"pet_out": "Питомца нет",
							"auto_cleaning_completed": "Автоуборка завершена",
							"periodic_cleaning_completed": "Периодическая уборка выполнена",
							"manual_cleaning_completed": "Ручная уборка выполнена",
							"auto_cleaning_terminated": "Автоматическая уборка завершена",
							"periodic_cleaning_terminated": "Периодическая уборка завершена",
							"manual_cleaning_terminated": "Ручная уборка завершена",
							"auto_cleaning_failed_full": "Сбой автоматической уборки",
							"auto_cleaning_failed_hall_l": "Сбой автоматической уборки, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
							"auto_cleaning_failed_hall_t": "Сбой автоматической уборки,верхняя крышка чаши туалетного лотка установлена неправильно, пожалуйста, проверьте",
							"scheduled_cleaning_failed_full": "Запланированная уборка не удалась, контейнер для сбора мусора полон, пожалуйста, опорожните его как можно скорее",
							"scheduled_cleaning_failed_hall_l": "Запланированная уборка не удалась, цилиндр неправильно зафиксирован на месте, пожалуйста,проверьте",
							"scheduled_cleaning_failed_hall_t": "Запланированная уборка не удалась,крышка чаши туалетного лотка установлена неправильно, пожалуйста,проверьте",
							"manual_cleaning_failed_full": "Сбой ручной уборки, контейнер для отходов переполнен, пожалуйста, опорожните его скорее",
							"manual_cleaning_failed_hall_l": "Сбой ручной уборки, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
							"manual_cleaning_failed_hall_t": "Сбой ручной уборки, крышка чаши туалетного лотка установлена неправильно, пожалуйста, проверьте",
							"auto_cleaning_canceled": "Отмена автоматической уборки, устройство в действии",
							"periodic_cleaning_canceled": "Отмена периодической уборки, устройство в действии",
							"manual_cleaning_canceled": "Отмена ручной уборки, устройство в действии",
							"auto_cleaning_canceled_kitten": "Включен режим котёнок, авто уборка отменена",
							"periodic_cleaning_canceled_kitten": "Включен режим котёнок, периодическая уборка отменена",
							"litter_empty_completed": "Кошачий туалет опорожнён",
							"litter_empty_terminated": "Завершено опорожнение кошачьего туалета ",
							"litter_empty_failed_full": "Сбой в опорожнении кошачьего туалета, контейнер для отходов переполнен, пожалуйста, опопрожните его быстрее",
							"litter_empty_failed_hall_l": "Сбой в опорожнении кошачьего туалета,цилиндр неправильно зафиксирован на месте,пожалуйста, проверьте",
							"litter_empty_failed_hall_t": "Сбой в опорожнении кошачьего туалета, крышка чаши туалетного лотка установлена неправильно, пожалуйста, проверьте",
							"reset_completed": "Сброс устройства выполнен",
							"reset_terminated": "Сброс устройства завершён",
							"reset_failed_full": "Не выполнен сброс устройства, контейнер для отходов переполнен, пожалуйста, опорожните его быстрее",
							"reset_failed_hall_l": "Не выполнен сброс устройства, цилиндр неправильно зафиксирован на месте, пожалуйста, проверьте",
							"reset_failed_hall_t": "Не выполнен сброс устройства, крышка чаши туалетного лотка установлена неправильно, пожалуйста, проверьте",
							"deodorant_finished": "Закончился дезодорант",
							"periodic_odor_completed": "Выполнено периодическое удаление запаха",
							"manual_odor_completed": "Выполнено ручное удаление запаха",
							"deodorant_finished_liquid_lack": "Закончился дезодорант,недостаточно очищающей жидкости, пожалуйста, пополняйте во-время",
							"periodic_odor_completed_liquid_lack": "Выполнено периодическое удаление запаха, недостаточно очищающей жидкости, пожалуйста, пополняйте во-время",
							"manual_odor_completed_liquid_lack": "Выполнено ручное удаление запаха, недостаточно очищающей жидкости, пожалуйста, пополняйте во-время",
							"auto_odor_failed": "Сбой автоматического удаления запаха, ошибка устранителя запаха",
							"periodic_odor_failed": "Сбой периодического удаления запаха, неисправность устранителя запаха",
							"manual_odor_failed": "Сбой ручного удаления запаха, неисправность устранителя запаха",
							"no_sub_events": "Нет связанных подсобытий"
						}
					}
				}
			},
			"latest_weight": {
				"name": "Последний вес"
			},
			"last_use_duration": {
				"name": "Длительность последнего использования"
			},
			"pura_air_battery": {
				"name": "Батарея Pure Air"
			},
			"pura_air_liquid": {
				"name": "Жидкость Pure Air"
			},
			"n50_odor_eliminator": {
				"name": "Устранитель запаха № 50"
			},
			"max_last_event": {
				"name": "Последнее событие",
				"state": {
					"no_events_yet": "Событий нет",
					"event_type_unknown": "Вид события неизвестен",
					"cleaning_completed": "Очистка выполнена",
					"dumping_over": "Разгрузка",
					"reset_over": "Перезагрузка",
					"spray_over": "Распыление",
					"light_over": "Свет",
					"pet_out": "Питомца нет",
					"auto_cleaning_completed": "Выполнена автоуборка",
					"periodic_cleaning_completed": "Выполнена периодическая уборка",
					"manual_cleaning_completed": "Выполнена ручная уборка",
					"auto_cleaning_terminated": "Завершена автоматическая уборка",
					"periodic_cleaning_terminated": "Завершена периодическая уборка",
					"manual_cleaning_terminated": "Завершена ручная уборка",
					"auto_cleaning_failed_full": "Сбой автоматической уборки, контейнер для отходов переполнен, пожалуйста, опорожните его скорее",
					"auto_cleaning_failed_hall_t": "Сбой автоматической уборки, верхняя крышка лотка установлена неправильно, пожалуйста, проверьте",
					"auto_cleaning_failed_falldown": "Сбой автоматической уборки, туалетный лоток опрокинут, пожалуйста, проверьте",
					"auto_cleaning_failed_other": "Сбой автоматической уборки, неисправность устройства, пожалуйста, проверьте",
					"scheduled_cleaning_failed_full": "Запланированная уборка не удалась, контейнер для сбора мусора переполнен, пожалуйста, опорожните его как можно скорее",
					"scheduled_cleaning_failed_hall_t": "Запланированная уборка не удалась,верхняя крышка лотка установлена неправильно, пожалуйста,проверьте",
					"scheduled_cleaning_failed_falldown": "Запланированная уборка не удалась, туалетный лоток опрокинут, пожалуйста, проверьте",
					"scheduled_cleaning_failed_other": "Запланированная уборка не удалась, неисправность устройства, пожалуйста, проверьте",
					"manual_cleaning_failed_full": "Сбой ручной уборки, контейнер для отходов переполнен, пожалуйста, опорожните",
					"manual_cleaning_failed_hall_t": "Сбой ручной уборки, крышка лотка установлена неправильно, пожалуйста, проверьте",
					"manual_cleaning_failed_falldown": "Сбой ручной уборки, лоток опрокинут, пожалуйста,проверьте",
					"manual_cleaning_failed_other": "Сбой ручной уборки, неисправность устройства, пожалуйста, проверьте",
					"auto_cleaning_canceled": "Отмена автоматической уборки, устройство в действии",
					"periodic_cleaning_canceled": "Отмена периодической уборки,устройство в действии",
					"manual_cleaning_canceled": "Отмена ручной уборки, устройство в действии",
					"auto_cleaning_failed_maintenance": "Сбой автоматической уборки, устройство в режиме обслуживания",
					"periodic_cleaning_failed_maintenance": "Сбой периодической уборки, устройство в режиме обслуживания",
					"auto_cleaning_canceled_kitten": "Включен режим котёнок, автоуборка отменена",
					"periodic_cleaning_canceled_kitten": "Включен режим котёнок, периодическая уборка отменена",
					"litter_empty_completed": "Выполнено опорожнение лотка",
					"litter_empty_terminated": "Завершено опорожнение лотка",
					"litter_empty_failed_full": " Сбой в опорожнении лотка, контейнер переполнен, пожалуйста, опорожните скорее",
					"litter_empty_failed_hall_t": "Сбой в опорожнении лотка, неправильно установлена крышка чаши туалетного лотка, пожалуйста, проверьте",
					"litter_empty_failed_falldown": "Сбой в опопрожнении лотка, лоток опрокинут, пожалуйста, проверьте",
					"litter_empty_failed_other": "Сбой в опорожнении лотка, неисправность устройства, пожалуйста, проверьте",
					"reset_completed": "Выполнена перезагрузка устройства",
					"reset_terminated": "Завершена перезагрузка устройства",
					"reset_failed_full": "Сбой перезагрузки, контейнер переполнен, пожалуйста, опорожните скорее",
					"reset_failed_hall_t": "Сбой перезагрузки, чаша туалетного лотка установлена неправильно,пожалуйста, проверьте",
					"reset_failed_falldown": "Сбой перезагрузки, туалетный лоток опрокинутнут, пожалуйста, проверьте",
					"reset_failed_other": "Сбой перезагрузки, неисправность устройства, пожалуйста, проверьте",
					"maintenance_mode": "Режим обслуживания",
					"deodorant_finished": "Закончился дезодорант",
					"periodic_odor_completed": "Выполнено периодическое удаление запаха",
					"manual_odor_completed": "Выполнено ручное удаление запаха",
					"auto_odor_terminated": "Закончено автоматическое удаление запаха",
					"periodic_odor_terminated": "Закончено периодическое удаление запаха",
					"manual_odor_terminated": "Закончено ручное удаление запаха",
					"auto_odor_failed": "Сбой автоматического удаления запаха",
					"periodic_odor_failed": "Сбой периодического удаления запаха, неисправность устранителя запаха",
					"manual_odor_failed": "Сбой ручного удаления запаха, неисправность устранителя запаха",
					"auto_odor_canceled": "Отменено автоматическое удаление запаха, устройство работает",
					"periodic_odor_canceled": "Отменено периодическое удаление запаха. Туалетный лоток работает",
					"manual_odor_canceled": "Отменено ручное удаление запаха. Туалетный лоток работает",
					"auto_odor_failed_device": "Сбой автоматического удаления запаха, никакой умный спрей не подключен",
					"periodic_odor_failed_device": "Сбой периодического удаления запаха. Устройство устранения запаха отключено",
					"manual_odor_failed_device": "Сбой ручного удаления запаха. Устройство устранения запаха отключено",
					"auto_odor_failed_batt": "Сбой автоматического удаления запаха,пожалуйста, подтвердите, что батареи достаточно умного спрея",
					"periodic_odor_failed_batt": "Сбой периодического удаления запаха. Пожалуйста, убедитесь, что в устройстве для удаления запаха достаточно заряда батареи",
					"manual_odor_failed_batt": "Сбой ручного удаления запаха. Пожалуйста, убедитесь, что в устройстве для удаления запаха достаточно заряда батареи",
					"auto_odor_failed_low_batt": "Автоматическое удаление запаха не удалось, батарея разряжена",
					"periodic_odor_failed_low_batt": "Периодическое удаление запаха не удалось, батарея разряжена",
					"manual_odor_failed_low_batt": "Ручное удаление запаха не удалось, батарея разряжена",
					"cat_stopped_odor": "Ваша кошка пользуется лотком, дезодорация отменена",
					"light_on": "Включен свет",
					"light_already_on": "Свет включен. Нет необходимости включать его снова",
					"light_malfunc": "Не удалось включить свет. Неисправность устройства, пожалуйста, проверьте",
					"light_no_device": "Не удалосьвключить свет. Пожалуйста, сначала присоедините устройство для удаления запаха",
					"light_batt_cap": "Не удалось включить свет.Пожалуйста, проверьте емкость аккумулятора устройства удаления запаха",
					"light_low_batt": "Не удалось включить свет. Низкая ёмкость аккумулятора для устранения запаха"
				},
				"state_attributes": {
					"sub_events": {
						"state": {
							"no_events_yet": "Нет событий",
							"event_type_unknown": "Тип события не известен",
							"cleaning_completed": "Очистка выполнена",
							"dumping_over": "Разгрузка",
							"reset_over": "Перезагрузка",
							"spray_over": "Распыление",
							"light_over": "Свет",
							"pet_out": "Питомца нет",
							"auto_cleaning_completed": "Выполнена автоуборка",
							"periodic_cleaning_completed": "Выполнена периодическая уборка",
							"manual_cleaning_completed": "Выполнена ручная уборка",
							"auto_cleaning_terminated": "Выполнена автоматическая уборка",
							"periodic_cleaning_terminated": "Закончена периодическая уборка",
							"manual_cleaning_terminated": "Закончена периодическая уборка",
							"auto_cleaning_failed_full": "Сбой автоматической уборки, контейнер переполнен, пожалуйста, опоржните скорее",
							"auto_cleaning_failed_hall_t": "Сбой автоматической уборки, Верхняя крышка чаши лотка установлена неправильно, пожалуйчта, проверьте",
							"auto_cleaning_failed_falldown": "Сбой автоматической уборки, лоток опрокинут, пожалуйста, проверьте",
							"auto_cleaning_failed_other": "Сбой автоматической уборки, неисправность устройства, пожалуйста, проверьте",
							"scheduled_cleaning_failed_full": "Сбой запланированной уборки, контейнер переполнен, пожалуйста, опопрожните скорее",
							"scheduled_cleaning_failed_hall_t": "Сбой запланированной уборки, верхняя крышка лотка установлена неправильно, пожалуйста, проверьте",
							"scheduled_cleaning_failed_falldown": "Сбой запланированной уборки, лоток опрокинут, пожалуйста, проверьте",
							"scheduled_cleaning_failed_other": "Сбой запланированной уборки, неисправность устройства, пожалуйста, проверьте",
							"manual_cleaning_failed_full": "Сбой ручной уборки, контейнер переполнен, пожалуйста, опорожните скорее",
							"manual_cleaning_failed_hall_t": "Сбой ручной уборки, верхняя крышка лотка установлена неправильно, пожалуйста, проверьте",
							"manual_cleaning_failed_falldown": "Сбой ручной уборки,лоток опрокинут, пожалуйста, проверьте",
							"manual_cleaning_failed_other": "Сбой ручной уборки,неисправность устройства, пожалуйста, проверьте",
							"auto_cleaning_canceled": "Отменена автоматическая очистка, устройство работает",
							"periodic_cleaning_canceled": "Отменена периодическая очистка, устройство работает",
							"manual_cleaning_canceled": "Отменена ручная очистка, устройство работает",
							"auto_cleaning_failed_maintenance": "Сбой автоматической очистки, устройство в режиме обслуживания",
							"periodic_cleaning_failed_maintenance": "Сбой периодической очистки, устройство в режиме обслуживания",
							"auto_cleaning_canceled_kitten": "Включен режим котёнок, отменена автоочистка",
							"periodic_cleaning_canceled_kitten": "Включен режим котёнок, отменена периодическая очистка",
							"litter_empty_completed": "Кошачий туалет очищен",
							"litter_empty_terminated": "Завершена очистка кошачьего туалета",
							"litter_empty_failed_full": "Сбой в очистке  кошачьего туалета, контейнер переполнен, пожалуйста, опорожните скорее",
							"litter_empty_failed_hall_t": "Сбой в очистке  кошачьего туалета, крышка лотка установлена неправильно, пожалуйста, проверьте",
							"litter_empty_failed_falldown": "Сбой в очистке  кошачьего туалета, лоток опрокинут, пожалуйста, проверьте",
							"litter_empty_failed_other": "Сбой в очистке  кошачьего туалета, неисправность устройства, пожалуйста, проверьте",
							"reset_completed": "Перезагрузка выполнена",
							"reset_terminated": "Перезагрузка завершена",
							"reset_failed_full": "Сбой перезагрузки, контейнер для отходов переполнен, пожалуйста, опорожните скорее",
							"reset_failed_hall_t": "Сбой перезагрузки,крышка лотка установлена неправильно,пожалуйста, проверьте",
							"reset_failed_falldown": "Сбой перезагрузки, лоток опрокинут, пожалуйста, проверьте",
							"reset_failed_other": "Сбой перезагрузки, неисправность устройства, пожалуйста, проверьте",
							"maintenance_mode": "Режим обслуживания",
							"deodorant_finished": "Дезодорант закончился",
							"periodic_odor_completed": "Выполнено периодическое удаление запаха",
							"manual_odor_completed": "Выполнено ручное удаление запаха",
							"auto_odor_terminated": "Закончено автоматическое удаление запаха",
							"periodic_odor_terminated": "Закончено периодическое удаление запаха",
							"manual_odor_terminated": "Закончено ручное удаление запаха",
							"auto_odor_failed": "Сбой автоматического удаления запаха, ошибка устранителя запаха",
							"periodic_odor_failed": "Сбой периодическогок удаления запаха, неисправность устранителя запаха",
							"manual_odor_failed": "Сбой ручного удаления запаха, неисправность устранителя запаха",
							"auto_odor_canceled": "Отменено автоматическое удаление запаха, устройство в работе",
							"periodic_odor_canceled": "Отменено периодическое удаление запаха. Лоток работает",
							"manual_odor_canceled": "Отменено ручное удаление запаха. Лоток работает",
							"auto_odor_failed_device": "Сбой автоматического удаления запаха, никакой умный спрей не подсоединён",
							"periodic_odor_failed_device": "Сбой периодического удаления запаха. Осоединено устройство удаления запаха",
							"manual_odor_failed_device": "Сбой ручного удаления запаха. Отсоединено устройство удаления запаха",
							"auto_odor_failed_batt": "Сбой автоматического удаления запаха, пожалуйста, убедитесь. что в батарее умного спрея достаточно зарядки",
							"periodic_odor_failed_batt": "Сбой периодического удаления запаха. Пожалуйста, убедитесь, что в батарее Устройства для удаления запаха достаточно зарядки",
							"manual_odor_failed_batt": "Сбой ручного удаления запаха, Пожалуйста, убедитесь, чтов батарее Устройства для удаления запаха достаточно зарядки",
							"auto_odor_failed_low_batt": "Сбой автоматического удаления запаха. Низкий заряд батареи",
							"periodic_odor_failed_low_batt": "Сбой периодического удаления запаха. Низкий заряд батареи",
							"manual_odor_failed_low_batt": "Сбой ручного удаления запаха. Низкий заряд батареи",
							"cat_stopped_odor": "Ваш кот пользуется сейчас туалетным лотком, дезодорирование отменено",
							"light_on": "Включен свет",
							"light_already_on": "Включен свет. Нет необходимости включать снова",
							"light_malfunc": "Сбой включения света. Неиспарвность устройства, пожалуйста, проверьте",
							"light_no_device": "Сбой включения света. Пожалуйста, сначала подсоедините устранитель запаха",
							"light_batt_cap": "Сбой включения света. Пожалуйста, проверьте мощность батареи устранителя запаха",
							"light_low_batt": "Сбой включения света. Низкая мощность батареи устранителя запаха",
							"no_sub_events": "Нет связанных событий"
						}
					}
				}
			},
			"max_work_state": {
				"name": "Состояние",
				"state": {
					"cleaning_litter_box": "Очистка лотка",
					"cleaning_litter_box_paused": "Очистка приостановлена",
					"cleaning_paused_pet_entered": "Очистка туалетного лотка приостановлена: во время работы вошло домашнее животное, сработали датчики защиты от защемления, устройство перестало работать. Пожалуйста, проверьте устройство как можно скорее.",
					"cleaning_paused_system_error": "Очистка лотка приостановлена: Ошибка системы, операция приостановлена",
					"cleaning_paused_pet_approach": "Очистка лотка приостановлена: Ваш кот приближается к лотку, операция приостановлена",
					"cleaning_paused_pet_using": "Очистка лотка приостановлена: Ваш кот пользуется устройством, операция приостановлена",
					"resetting_device": "Перезагрузка устройства",
					"litter_box_paused": "Туалетный лоток приостановлен",
					"paused_pet_entered": "Лоток для мусора приостановлен: домашнее животное вошло во время работы, сработали датчики защиты от защемления, устройство перестало работать. Пожалуйста, проверьте устройство как можно скорее",
					"paused_system_error": "Туалетный лоток приостановлен: системная ошибка, работа приостановлена",
					"paused_pet_approach": "Туалетный лоток приостановлен: Ваша кошка приближается, работа приостановлена",
					"paused_pet_using": "Туалетный лоток приостановлен: ваша кошка использует устройство, работа приостановлена",
					"dumping_litter": "Опорожнение кошачьего туалета",
					"dumping_litter_paused": "Приостановка опорожнения кошачьего туалета",
					"dumping_paused_pet_entered": "Опорожнение кошачьего туалета приостановлено: домашнее животное вошло во время работы, активировались датчики защиты от защемления, устройство перестало работать. Пожалуйста, проверьте устройство как можно скорее",
					"dumping_paused_system_error": "Приостановка опорожнения кошачьего туалета: системная ошибка, операция приостановлена",
					"dumping_paused_pet_approach": "Приостановка опорожнения кошачьего туалета: Ваш кот приближается к лотку, операция приостановлена",
					"dumping_paused_pet_using": "Приостановка опорожнения кошачьего туалета: Ваш кот пользуется утсройством, операция приостановлена",
					"resetting": "Перезагрузка",
					"leveling": "Выравнивание кошачьего туалета, пожалуйста, подождите",
					"calibrating": "Калибровка кошачьего туалета, пожалуйста, подождите",
					"maintenance_mode": "В режиме обслуживания",
					"maintenance_paused_pet_entered": "Режим обслуживания приостановлен: домашнее животное вошло во время работы, активировались датчики защиты от защемления, устройство перестало работать. Пожалуйста, проверьте устройство как можно скорее",
					"maintenance_paused_cover": "Режим обслуживания приостановлен : Не установлена верхняя крышка, операция приостановлена",
					"maintenance_paused_system_error": "Режим обслуживания приостановлен : Ошибка системы, операция приостановлена",
					"maintenance_paused_pet_approach": "Режим обслуживания приостановлен: Ваш кот приюлижается к устройству, операция приостановлена",
					"maintenance_paused_pet_using": "Режим обслуживания приостановлен: Ваш кот пользуется устройством",
					"maintenance_paused": "Режим обслуживания приостановлен",
					"exit_maintenance": "Выход из режима обслуживания",
					"maintenance_exit_paused_pet_entered": "Выход из режима обслуживания приостановлен: домашнее животное вошло во время работы, активировались датчики защиты от защемления, устройство перестало работать. Пожалуйста, срочно проверьте устройство",
					"maintenance_exit_paused_cover": "Выход из режима обслуживания приостановлен: верхняя крышка не установлена, операция приостановлена",
					"maintenance_exit_paused_system_error": "Выход из режима обслуживания приостановлен: системная ошибка, операция приостановлена",
					"maintenance_exit_paused_pet_approach": "Выход из режима обслуживания приостановлен: Ваш кот приближается к устройству, операция приостановлена",
					"maintenance_exit_paused_pet_using": "Выход из режима обслуживания приостановлен: Ваш кот пользуется устройством (туалетом), операция приостановлена",
					"maintenance_exit_paused": "Выход из режима обслуживания приостановлен",
					"idle": "Устройство не используется"
				}
			},
			"avg_eating_time": {
				"name": "Среднее время приёма пищи"
			},
			"manually_dispensed_hopp_one": {
				"name": "Бункер с ручным дозированием 1"
			},
			"manually_dispensed_hopp_two": {
				"name": "Бункер с ручным дозированием 2"
			},
			"planned_hopp_one": {
				"name": "Запланированный бункер 1"
			},
			"planned_hopp_two": {
				"name": "Запланированный бункер 2"
			},
			"planned_dispensed_hopp_one": {
				"name": "Запланированный  раздаточный бункер 1"
			},
			"planned_dispensed_hopp_two": {
				"name": "Запланированный раздаточный бункер 2"
			},
			"dispensed_hopp_one": {
				"name": "Раздаточная воронка 1"
			},
			"dispensed_hopp_two": {
				"name": "Раздаточная воронка 2"
			},
			"humidity": {
				"name": "Влажность"
			},
			"temperature": {
				"name": "Температура"
			},
			"air_purified": {
				"name": "Очистка воздуха"
			},
			"liquid": {
				"name": "Жидкость"
			},
			"food_left": {
				"name": "Остаток пищи"
			}
		},
		"switch": {
			"light": {
				"name": "Свет"
			},
			"power": {
				"name": "Мощность"
			},
			"do_not_disturb": {
				"name": "Не беспокоить"
			},
			"indicator_light": {
				"name": "Световой индикатор"
			},
			"child_lock": {
				"name": "Блокировка от детей"
			},
			"food_shortage_alarm": {
				"name": "Сигнализация нехватки еды"
			},
			"dispense_tone": {
				"name": "Звук выдачи"
			},
			"voice_with_dispense": {
				"name": "Голос с дозированием"
			},
			"surplus_control": {
				"name": "Контроль излишков"
			},
			"system_notification_sound": {
				"name": "Звук системного уведомления"
			},
			"auto_odor_removal": {
				"name": "Автоудаление запаха"
			},
			"auto_cleaning": {
				"name": "Автоочистка"
			},
			"avoid_repeat_cleaning": {
				"name": "Избегайте повторной очистки"
			},
			"periodic_cleaning": {
				"name": "Периодическая очистка"
			},
			"periodic_odor_removal": {
				"name": "Периодическое удаление запаха"
			},
			"kitten_mode": {
				"name": "Режим котёнок"
			},
			"display": {
				"name": "Дисплей"
			},
			"light_weight_cleaning_disabled": {
				"name": "Легкая очистка отключена"
			},
			"cont_rotation": {
				"name": "Непрерывное вращение"
			},
			"deep_cleaning": {
				"name": "Глубокая очистка"
			},
			"deep_deodor": {
				"name": "Глубокая дезодорация"
			},
			"prompt_tone": {
				"name": "Сигнал подсказки"
			}
		},
		"text": {
			"manual_feed": {
				"name": "Ручная кормежка"
			}
		}
	}
}

[Feature request] PRESS Button for Feeders

Hi @RobertD502
Your integration works perfectly and I thank you for all the work provided. I have the “Fresh Element Mini Pro” kibble dispenser.

I use Home Assistant to make up for the lack of integration of my Homey box (https://homey.app/). Everything works, however one thing is preventing me from using the Fresh Element Mini Pro integration. One feature that is not supported is the custom drop-down list:
CleanShot 2023-09-24 at 09 48 28

Is there a way to use a button or switch to dispense a fixed quantity of kibble? Indeed, custom drop-down lists are not supported by my Homey plugin (https://homey.app/fr-fr/app/io.home-assistant.community/Home-Assistant-Community/).

If you have a workaround or if you could add a "Press" button that would be really great and would perfectly complete my integration.

I thank you in advance !

A timezone could not be found

I'm running Home Assistant 2023.9.2 Supervisor 2023.09.2 Operating System 10.5 Frontend 20230911.0 - latest, not a Docker version, but still getting this error when try to setup integration.

Logger: custom_components.petkit
Source: custom_components/petkit/util.py:34
Integration: PetKit ([documentation](https://github.com/RobertD502/home-assistant-petkit/blob/main/README.md), [issues](https://github.com/RobertD502/home-assistant-petkit/issues))
First occurred: 14:28:37 (2 occurrences)
Last logged: 14:36:08
A timezone could not be found. If you are running Home Assistant as a standalone Docker container, you must define the TZ environmental variable.

TZ environment variable presents in system:

изображение

Hack for local control

Has anyone tried to open the litter and tried to dump the microcontroller ?
My router advertise it as Espressif, so it may be "powered" by esp or something like that.
I have a Pura MAX, but no skills at all regarding fw dump, so if anyone has the courage to reverse engineer it, I can help ! 😄

Enhanced logging around pet feeding

Not sure if this is how I utilize my petkit fresh element feeder or if it's something that others are potentially dealing with too. I have feedings that are set for specific times, but what I'm seeing is that the device frequently goes unavailable because of petkit servers or the the API might be down for maintenance, resulting in the feeding never happening. Currently there's no good way to view this at an device/entity level, so I find myself checking a camera at the time of the feeding and listening for the dispensing food. This brings me to my question, is it possible to add a log entry when food is actually dispensed?

Failed to login (US region)

Hi my account is an US regions and when I try to login via hass integration, I got this error:
Unknown PetKit Error: PetKit Error 125: The phone number is not registered.

I did not check asia or china account checkboxes.

Traceback (most recent call last):
 File "/config/custom_components/petkit/util.py", line 41, in async_validate_api
 devices_query = await client.get_device_roster()
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 170, in get_device_roster
 await self.check_token()
 File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 144, in check_token
 await self.login()
 File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 130, in login
 response = await self._post(login_url, headers, data)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 404, in _post
 return await self._response(resp)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.11/site-packages/petkitaio/petkit_client.py", line 426, in _response
 raise PetKitError(f'PetKit Error {code}: {response["error"]["msg"]}')
petkitaio.exceptions.PetKitError: PetKit Error 125: The phone number is not registered

Integration not supported in UI?

Im just following after the first step to go to the integrations page, click the plus and select Petkit. When i do i get a pop-up "This device cannot be added from the UI - You can add this device by adding it to your 'configuration.yaml'. See the documentation for more information."

Not sure how to proceed as the setup for yaml config wasnt provided.

Support for YumShare Solo

Hello, thank you for the great integration! It's very easy to setup and works really well. I do wonder if you can add support for the YumShare Solo feeder that Petkit just recently released:
https://petkit.com/products/yumshare-solo-with-camera

I just bought one on Black Friday but it doesn't show up as one of the my devices when I configure this integration. My Eversweet Solo 2 and cats showed up without any issue so I know the integration is configured correctly. If you need any help getting the API data for the device, please let me know how to collect the necessary information.

Thanks again for building this helpful integration!

Eversweet energy usage

Hi Robert,

I am starting to fill in my individual devices to track energy usage and I saw something weird.

image

Is this something that can be solved?
I noticed this for quite a while, but since it wasn't that important not really an issue.

HA: 2024.3.0
TZ: Europe/Amsterdam

No devices found

Hi, thank you for your compontent!!!

I have a Fresh Element Mini Pro and a Pura X.... I created a new account, as indicated in the instructions, via the Petkit app and shared the two devices.
The new user, through the app, is able to use the devices normally.

If I create the integration in Home Assistant with the new user data, the "no devices found" error appears, while if I create the integration with the original user data I have all my devices available.

How is this possible?
Thank you :)

Cat weight

Hello. I can't see the most important sensor in puramax "cat weight". Is it there?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.