A Home Assistant integration that monitors the Bulgaria electricity grid websites for power interruption notifications and alerts you when your address will be affected.
⚠️ BETA WARNING: This integration is currently in beta. It may contain bugs or undergo significant changes. Use at your own risk.
- Daily scraping of power interruption announcements from multiple power companies
- Currently supports:
- ERP Sever (planned interruptions)
- ERYug (both planned and unplanned interruptions)
- Monitors multiple addresses (add as many as you need)
- Binary sensor that turns ON when your address is affected
- Detailed sensor showing interruption date, time, and provider
- Compatible with Home Assistant notifications
- Make sure HACS is installed in your Home Assistant instance
- Add this repository as a custom repository in HACS:
- Go to HACS > Integrations
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add the URL of this repository
- Select "Integration" as the category
- Click "Install" on the Bulgarian Electrical Grid Assistant card
- Restart Home Assistant
-
Download the latest release or clone this repository
-
Create a directory structure in your Home Assistant configuration folder:
custom_components/bulgarian_electrical_grid_assistant/ -
Copy all files from this repository into the directory
-
Restart Home Assistant
- In Home Assistant, go to Configuration > Integrations
- Click the "+ Add Integration" button
- Search for "Bulgarian Electrical Grid Assistant"
- Enter your configuration:
- Addresses: Enter your street addresses, separated by commas
- Scan Interval: How often to check for updates (minimum 3600 seconds/1 hour)
- Providers: Select which power companies to monitor (ERP and/or ERYug)
| Option | Description | Default |
|---|---|---|
| Addresses | Comma-separated list of your addresses to monitor | Required |
| Scan Interval | Interval in seconds between checks | 86400 (24 hours) |
| Providers | Which power companies to monitor | All providers enabled |
After installation, the integration creates two entities:
-
Binary Sensor:
binary_sensor.power_interruption_alert- State: ON when a power interruption is scheduled for your address
- Attributes:
matched_address: Which of your addresses matchedinterruption_date: Date of the scheduled interruptioninterruption_time: Time of the scheduled interruptionprovider: Which power company reported the interruptiontype: Type of interruption (planned/unplanned)
-
Sensor:
sensor.power_interruption_details- State: Shows a summary of the interruption
- Attributes:
interruption_date: Date of the scheduled interruptioninterruption_time: Time of the scheduled interruptionaffected_addresses: List of all affected addressesprovider: Which power company reported the interruptiontype: Type of interruption (planned/unplanned)
To receive notifications when a power interruption is scheduled for your address:
- Go to Configuration > Automations & Scenes
- Click the "+ Create Automation" button
- Add a trigger:
- Trigger type: State
- Entity:
binary_sensor.power_interruption_alert - From:
off - To:
on
- Add an action:
-
Action type: Call service
-
Service:
notify.mobile_app_your_phone(replace with your notification service) -
Service data:
title: "Power Interruption Alert!" message: "Power interruption scheduled for {{ state_attr('binary_sensor.power_interruption_alert', 'matched_address') }} on {{ state_attr('binary_sensor.power_interruption_alert', 'interruption_date') }} at {{ state_attr('binary_sensor.power_interruption_alert', 'interruption_time') }} by {{ state_attr('binary_sensor.power_interruption_alert', 'provider') }}"
-
If the integration isn't working as expected:
- Check Home Assistant logs for errors: Configuration > System > Logs
- Verify your addresses match the format used on the website
- Try adding partial street names if full addresses don't match
- Make sure the integration has internet access
- Check that you've selected the correct providers for your region
This project is licensed under the MIT License - see the LICENSE file for details.