A custom Home Assistant integration for tracking packages at your building's concierge desk.
- Configuration UI: Easy setup through Home Assistant's UI with username, password, and device ID
- Async-first: Built with modern async patterns using DataUpdateCoordinator
- Package Count Sensor:
{firstname}_packages_ready_to_collect- Shows count of packages waiting for pickup - Package List Sensor:
{firstname}_packages_list- Full list of all packages with codes and details - Auto-refresh: Polls for updates every 5 minutes (configurable)
- Reauth Support: Handles credential expiration gracefully
- Open HACS in your Home Assistant
- Click on "Integrations"
- Click the three dots menu → "Custom repositories"
- Add this repository URL and select "Integration" as the category
- Install "BLife Concierge Packages"
- Restart Home Assistant
- Copy the
custom_components/blife_packagesfolder to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- BLife credentials (username, password, device ID) are only entered in Home Assistant’s UI and stored in HA’s config – they are never in this repo.
- Deploy script: Do not hardcode your Home Assistant host or SSH user. Use environment variables:
export HA_HOST=192.168.0.117(orhomeassistant.local)export HA_USER=rootexport HA_CONFIG_PATH=/config- Then run
./deploy.sh
- Optional: create a
deploy.local.shthat sets these and run that instead;deploy.local.shis in.gitignoreand will not be committed.
- Go to Settings → Devices & Services
- Click + Add Integration
- Search for "BLife Concierge Packages"
- Enter your credentials:
- Username: Your BLife account email/username
- Password: Your BLife account password
- Device ID: Your building's unique device identifier
After configuration, the integration creates the following sensors:
- Entity ID:
sensor.{firstname}_packages_ready_to_collect - State: Number of packages ready for pickup
- Attributes:
packages: List of ready packages with details
- Entity ID:
sensor.{firstname}_packages_list - State: Total number of packages
- Attributes:
packages: Full list of all packagesready_count: Number ready for pickupcollected_count: Number already collected
Each package in the list includes:
package_id: Unique package identifiercode: Pickup code for the conciergedescription: Package descriptionarrived_at: Arrival timestampstatus: Current status (ready/collected)sender: Package sendercarrier: Delivery carrier
automation:
- alias: "New Package Notification"
trigger:
- platform: state
entity_id: sensor.john_packages_ready_to_collect
condition:
- condition: template
value_template: "{{ trigger.to_state.state | int > trigger.from_state.state | int }}"
action:
- service: notify.mobile_app
data:
title: "📦 New Package!"
message: "You have {{ states('sensor.john_packages_ready_to_collect') }} package(s) ready for pickup"automation:
- alias: "Daily Package Summary"
trigger:
- platform: time
at: "18:00:00"
condition:
- condition: numeric_state
entity_id: sensor.john_packages_ready_to_collect
above: 0
action:
- service: notify.mobile_app
data:
title: "📬 Package Reminder"
message: "Don't forget! You have {{ states('sensor.john_packages_ready_to_collect') }} package(s) waiting at the concierge."The integration currently uses stub data for development. To connect to your actual BLife API:
-
Update
coordinator.py:- Replace the stub
_fetch_packages_data()method with actual API calls - Implement proper authentication flow
- Replace the stub
-
Update
config_flow.py:- Replace the stub
validate_input()function with actual API validation
- Replace the stub
-
Update
const.py:- Set
API_BASE_URLto your actual API endpoint
- Set
custom_components/blife_packages/
├── __init__.py # Integration setup
├── config_flow.py # Configuration UI flow
├── const.py # Constants and configuration
├── coordinator.py # Data update coordinator
├── manifest.json # Integration metadata
├── sensor.py # Sensor entities
├── strings.json # Translation strings
└── translations/
└── en.json # English translations
- Home Assistant 2024.1.0 or later
- Python 3.11+
MIT License