NeoVac MyEnergy integration for Home Assistant
|
|
||
|---|---|---|
| custom_components/neovac | ||
| tests | ||
| .gitignore | ||
| hacs.json | ||
| README.md | ||
| renovate.json | ||
| requirements.txt | ||
NeoVac MyEnergy for Home Assistant
Custom integration for Home Assistant that provides energy and water consumption data from NeoVac MyEnergy for the Energy Dashboard.
Features
- Electricity consumption tracking (kWh)
- Water consumption tracking (m³) - total, warm, and cold water
- Heating consumption tracking (kWh)
- Cooling consumption tracking (kWh)
- Configurable polling interval (default: 15 minutes)
- Compatible with the Home Assistant Energy Dashboard
- Automatic discovery of available energy categories per metering point
- UI-based configuration with usage unit (metering point) selection
Requirements
- A NeoVac MyEnergy account (email + password)
- Home Assistant 2024.1.0 or newer
Installation
HACS (Recommended)
- Open HACS in your Home Assistant instance
- Go to Integrations
- Click the three dots menu (top right) and select Custom repositories
- Add this repository URL and select Integration as the category
- Click Add
- Search for "NeoVac MyEnergy" and install it
- Restart Home Assistant
Manual
- Copy the
custom_components/neovacdirectory to your Home Assistantcustom_componentsfolder - Restart Home Assistant
Configuration
- Go to Settings > Devices & Services
- Click + Add Integration
- Search for "NeoVac MyEnergy"
- Enter your NeoVac MyEnergy email and password
- Select the usage unit (metering point) you want to monitor
- The integration will automatically discover available energy categories and create sensors
Options
After setup, you can configure the polling interval:
- Go to Settings > Devices & Services
- Click on the NeoVac MyEnergy integration
- Click Configure
- Set the update interval (5-60 minutes, default: 15)
Energy Dashboard
The sensors created by this integration are fully compatible with the Home Assistant Energy Dashboard:
- Electricity consumption sensors use
SensorDeviceClass.ENERGYwithkWh - Water consumption sensors use
SensorDeviceClass.WATERwithm³ - Heating/Cooling sensors use
SensorDeviceClass.ENERGYwithkWh
All sensors use SensorStateClass.TOTAL_INCREASING for proper long-term statistics tracking.
To add them to the Energy Dashboard:
- Go to Settings > Dashboards > Energy
- Add the electricity sensor under Electricity Grid > Grid Consumption
- Add water sensors under Water Consumption
- Add heating sensors under Gas Consumption (or as individual devices)
Standalone API Testing
A CLI test script is included to test the API connection without running Home Assistant:
# Using command-line arguments
python tests/test_api.py --email your@email.com --password yourpassword
# Using environment variables
export NEOVAC_EMAIL=your@email.com
export NEOVAC_PASSWORD=yourpassword
python tests/test_api.py
# With verbose debug output
python tests/test_api.py --email your@email.com --password yourpassword --verbose
# Dump raw API responses to JSON files for debugging
python tests/test_api.py --email your@email.com --password yourpassword --dump-raw
# Query a specific usage unit
python tests/test_api.py --email your@email.com --password yourpassword --unit-id 12345
The test script will:
- Authenticate with the NeoVac API
- List all available usage units
- Fetch invoice periods
- Discover available energy categories
- Fetch consumption data for each category
- Print a summary of all findings
Sensors Created
Depending on your metering setup, the integration creates some or all of these sensors:
| Sensor | Device Class | Unit | Energy Dashboard |
|---|---|---|---|
| Electricity consumption | energy |
kWh | Grid consumption |
| Water consumption | water |
m³ | Water consumption |
| Warm water consumption | water |
m³ | Water consumption |
| Cold water consumption | water |
m³ | Water consumption |
| Heating consumption | energy |
kWh | Gas consumption |
| Cooling consumption | energy |
kWh | Individual device |
Troubleshooting
Authentication fails
- Verify your credentials work at myenergy.neovac.ch
- The integration authenticates via auth.neovac.ch, which is the same login portal used by the web app
- Run the CLI test script with
--verboseto see detailed authentication debug output
No sensors created
- Check that your usage unit has active metering for the expected categories
- Run the CLI test script to see which categories are available for your unit
- Check the Home Assistant logs for warnings from the
neovacintegration
Data not updating
- Check the configured polling interval in the integration options
- The NeoVac API provides data with hourly resolution at best
- New data may take some time to appear in the NeoVac system