This custom integration allows you to monitor your BoilerJuice oil tank details in Home Assistant.
- 📊 Monitor your oil tank level and volume
- 📈 Track oil consumption with accurate time-based calculations
- 💰 View current oil prices
- ⚡ Calculate energy costs (kWh)
- ⏱️ Estimate days until empty
- 🌡️ Seasonal consumption tracking (Winter/Spring/Summer/Autumn)
- 📉 7-day rolling average for consumption
- 🔔 Refill detection
The integration works by:
-
Data Collection:
- Logs into your BoilerJuice account securely
- Scrapes tank data from your account page
- Fetches current oil prices from the kerosene prices page
- Updates once per day to avoid excessive requests
-
Tank Monitoring:
- Tracks oil level percentage
- Monitors current volume and tank capacity
- Records tank dimensions (height, capacity)
- Note: BoilerJuice simplified their interface and now provides a single oil level (previously had separate total/usable)
-
Consumption Tracking (Time-Based):
- Smart tracking: Only updates reference values when tank level actually changes
- Accurate daily rate: Spreads consumption across actual days between BoilerJuice updates
- Refill detection: Automatically detects refills and resets reference without losing history
- Rolling average: 7-day rolling average for smoother consumption trends
- Seasonal analysis: Tracks consumption patterns by season (Winter/Spring/Summer/Autumn)
- Converts oil consumption to energy (kWh)
- Estimates days until empty based on actual usage patterns
-
Energy Calculations:
- Converts oil volume to energy using configurable kWh/L value
- Default energy content is 10.35 kWh/L for heating oil
- Calculates cost per kWh based on current oil price
- Helps compare heating costs with other energy sources
-
Data Updates:
- Automatically refreshes data daily
- Updates all sensors simultaneously
- Maintains historical consumption data
- Allows manual reset of consumption counters
- Copy the
custom_components/boilerjuicefolder to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Configuration > Integrations
- Click the "+ ADD INTEGRATION" button
- Search for "BoilerJuice" and select it
- Enter your BoilerJuice email and password
- Optionally configure the kWh per litre value (defaults to 10.35 kWh/L for heating oil)
- Email: Your BoilerJuice account email address
- Password: Your BoilerJuice account password
- Tank ID: Your tank ID if you have multiple tanks (auto-detected if not specified)
- kWh per litre: Energy content of your oil in kWh per litre (default: 10.35 for heating oil)
- Oil Level (%) - Current oil level as a percentage of tank capacity
- Device Class: Battery (shows as battery icon in UI)
- Shows the single oil level provided by BoilerJuice
- Tank Volume (L) - Current volume of oil in the tank
- Tank Capacity (L) - Total tank capacity
- Daily Oil Consumption (L/day) - Average daily oil consumption
- Calculated by spreading consumption across actual days between level changes
- Uses 7-day rolling average for accurate trending
- Total Oil Consumption (L) - Total oil consumed since last reset
- Accumulates whenever tank level decreases
- Total Oil Consumption (kWh) - Total energy consumed
- Converted from litres using kWh/L ratio
- Oil Consumption (kWh) - Incremental energy consumption sensor
- For use with Home Assistant Energy dashboard
- Seasonal Oil Consumption (L/day) - Current season's average daily consumption
- Tracks patterns across Winter, Spring, Summer, and Autumn
- BoilerJuice Oil Price (GBP/litre) - Current oil price per litre
- Oil Energy Content (kWh/L) - Energy content of your oil
- Oil Cost per kWh (GBP/kWh) - Current cost of energy from your oil
- Days Until Empty (days) - Estimated days until tank is empty based on current consumption rate
- Tank Height (cm) - Physical height of your tank
- Last Updated - Timestamp of when tank level last changed (not when integration last ran)
Resets the consumption counters to zero and sets current level as new baseline.
Use this after upgrading from older versions to clear stuck reference values.
service: boilerjuice.reset_consumptionManually set consumption values (useful for initializing with known values).
service: boilerjuice.set_consumption
data:
liters: 500 # Total litres consumed
daily: 15 # Optional: daily consumption rate in L/dayIf you're upgrading from v1.0.x or earlier, please note:
-
Simplified Sensors: Duplicate sensors have been removed
Total Oil LevelandUsable Oil Level→ now justOil LevelUsable Oil Volume→ now justTank Volume
-
Update Your Dashboards: Replace old sensor entities with new ones
sensor.my_tank_total_oil_level→sensor.my_tank_oil_levelsensor.my_tank_usable_oil_level→sensor.my_tank_oil_levelsensor.my_tank_usable_oil_volume→sensor.my_tank_tank_volume
-
Reset consumption tracking to clear stuck reference values:
service: boilerjuice.reset_consumption
-
Update automations and dashboards that reference old sensor entities
-
Old sensor entities will become
unavailable- you can safely remove them from the entity registry
- Clone this repository
- Create a virtual environment:
python3 -m venv venv - Activate the virtual environment:
source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
python3 test_boilerjuice.pyCreate a .env file with your BoilerJuice credentials:
BOILERJUICE_EMAIL=your_email@example.com
BOILERJUICE_PASSWORD=your_passwordThe integration uses smart time-based consumption tracking:
Example:
Dec 1: Tank at 850L → Reference saved
Dec 2-5: BoilerJuice data unchanged (850L) → Reference stays at 850L
Dec 6: Tank at 800L → Detected 50L used over 5 days = 10 L/day ✅
Old behavior would have shown: 50 L/day (dividing by 1 day) ❌
- Only updates when level changes: Reference values only update when BoilerJuice reports a different tank level
- Spreads across actual time: Consumption is divided by days since last level change
- Refill detection: Automatically detects when tank level goes up (refill)
- Rolling average: Maintains 7-day rolling average for smoother trends
- Seasonal tracking: Analyzes consumption patterns by season
- Last Updated: Shows when tank level last changed, not when integration last ran
- Daily Consumption: Rolling 7-day average of consumption spread across actual days
- Days Until Empty: Current volume ÷ daily consumption rate
- Authentication errors: Double-check your email and password
- Missing data: Ensure your BoilerJuice account is active and has a tank configured
- Incorrect readings: Verify your tank details on the BoilerJuice website
- Consumption stuck at 0: Run the
boilerjuice.reset_consumptionservice to start fresh - Last Updated not changing: This is normal if your tank level hasn't changed - it updates when BoilerJuice reports a different level
- Sensors unavailable after upgrade: Update dashboard to use new simplified sensor names (see Migration section)
To enable debug logging, add to your configuration.yaml:
logger:
default: info
logs:
custom_components.boilerjuice: debug- Check the Home Assistant Community Forums
- Open an issue in this repository with:
- Home Assistant version
- Integration version
- Relevant logs (with debug enabled)
- Description of the issue
Feel free to contribute to the development of this integration:
- Fork the repository
- Create a feature branch
- Submit a Pull Request
This integration is licensed under MIT License.