A Home Assistant integration for controlling Petkit W5 series water fountains via Bluetooth Low Energy (BLE). Control your pet's water fountain locally without cloud dependencies.
- Local Control: No cloud connection required - all communication via BLE
- Multiple Entity Types: Sensors, switches, and binary sensors for complete device monitoring
- Real-time Status: Monitor battery, filter status, water levels, and more
- Device Control:
- Switch between Normal and Smart operating modes
- Control LED brightness and on/off schedules
- Manage Do Not Disturb functionality
- Reset filter and monitor its lifetime
- Home Assistant Services: Advanced device configuration through HA services
- Energy Monitoring: Track power consumption and runtime statistics
- Alerts: Receive notifications for breakdowns, filter changes, and low water
- Petkit W4 Series
- Petkit W5 Series (Tested with Eversweet 2 Solo)
- Petkit CTW2 Series
- Make sure HACS is installed in your Home Assistant instance
- In HACS, go to "Integrations"
- Click the three dots in the top right corner and select "Custom repositories"
- Add this repository URL:
https://github.com/pdiegmann/ha-petkit-ble - Select "Integration" as the category
- Click "Add"
- Find "Petkit BLE Water Fountain" in the integration list and install it
- Restart Home Assistant
- Copy the
custom_components/petkit_bledirectory to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Configuration -> Integrations -> Add Integration
- Search for "Petkit BLE" and follow the setup process
- Home Assistant 2023.8.0 or later
- Your Petkit device must be discoverable via Bluetooth
- Home Assistant must have Bluetooth access (built-in or USB adapter)
- Go to Configuration -> Integrations
- Click Add Integration
- Search for "Petkit BLE Water Fountain"
- The integration will automatically discover available Petkit devices
- Select your device from the list
- Click Submit to complete the setup
The integration will create entities for:
- Battery level
- Filter percentage remaining
- Filter time left
- Pump runtime (total and today)
- Purified water (total and today)
- Energy consumption
- RSSI (signal strength)
- Voltage
- Power status
- Running status
- Warning indicators (breakdown, filter, water missing)
- DND (Do Not Disturb) state
- Lock state
- Power on/off
- Smart mode toggle
- LED control
The integration provides Home Assistant services for advanced control:
Reset the water filter counter.
Configure device settings including:
smart_time_on: Smart mode on duration (minutes)smart_time_off: Smart mode off duration (minutes)led_brightness: LED brightness (0-100%)
Example service call:
service: petkit_ble.set_device_config
data:
smart_time_on: 30
smart_time_off: 90
led_brightness: 50automation:
- alias: "Petkit Low Battery Alert"
trigger:
platform: numeric_state
entity_id: sensor.petkit_water_fountain_battery
below: 20
action:
service: notify.mobile_app
data:
message: "Water fountain battery is low ({{ states('sensor.petkit_water_fountain_battery') }}%)"automation:
- alias: "Petkit Filter Replacement"
trigger:
platform: numeric_state
entity_id: sensor.petkit_water_fountain_filter_percentage
below: 10
action:
service: notify.mobile_app
data:
message: "Time to replace the water fountain filter ({{ states('sensor.petkit_water_fountain_filter_percentage') }}% remaining)"- Ensure your Petkit device is in pairing mode
- Check that Bluetooth is enabled on your Home Assistant host
- Move Home Assistant closer to the device during setup
- Restart the Bluetooth service:
sudo systemctl restart bluetooth
- The device can only maintain one BLE connection at a time
- Close the official Petkit app before using this integration
- Using certain commands may interfere with the official app's communication
Enable debug logging by adding to your configuration.yaml:
logger:
logs:
custom_components.petkit_ble: debug- Device can only maintain one active BLE connection
- Do Not Disturb scheduling not yet fully supported
- Some advanced LED scheduling features not implemented
- Using the integration alongside the official app may cause conflicts
Contributions are welcome! Please feel free to submit a Pull Request.
If you find this integration useful, consider supporting the development:
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by RobertD502's Petkit integration
- Based on petkitaio library
- BLE protocol analysis from PetKit Eversweet Pro 3 research