Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasonmadigan/ha-esb-faults
ESB Networks PowerCheck Faults integration for Home Assistant
https://github.com/jasonmadigan/ha-esb-faults
electricity-grid energy-monitor esb-networks home-assistant home-assistant-integration home-automation iot
Last synced: 1 day ago
JSON representation
ESB Networks PowerCheck Faults integration for Home Assistant
- Host: GitHub
- URL: https://github.com/jasonmadigan/ha-esb-faults
- Owner: jasonmadigan
- Created: 2023-06-14T11:06:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-09T14:01:42.000Z (5 months ago)
- Last Synced: 2024-06-09T14:57:24.202Z (5 months ago)
- Topics: electricity-grid, energy-monitor, esb-networks, home-assistant, home-assistant-integration, home-automation, iot
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ESB Networks PowerCheck Faults integration for Home Assistant
This repository contains a Home Assistant integration for [ESB Networks PowerCheck](https://powercheck.esbnetworks.ie/) display notable service interruptions for a given location, within a configured proximity. The integration relies upon a connection to ESB Network's PowerCheck API.
## Installation
You will need [HACS](https://hacs.xyz) installed in your Home Assistant server. Install the integration by installing this repository as a Custom Respository (working on adding this to the default HACS integration set). Then, navigate to Integrations, Add an Integration and select ESB Faults. You will then be asked to enter:
* Latitude: Your location latitude
* Longitude: Your location longitude
* Proximity: Filters alerts to within `X` kilometers of your lat/lon.
* API Key: I won't include this here, but you can find it by inspecting requests on the PowerCheck website. Look for the `Api-Subscription-Key` key.[![Open your Home Assistant instance and add this integration](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=esb_faults)
## Entities
The integration reads data 5 minutes. It exposes one entity, `sensor.esb_faults_sensor`. The *State* of the sensor is a numeric value, indiciating how many total faults (be they Planned Outages, Recent Restorations or Current Unplanned Faults) are present nearby. The attributes for the sensor include a an `outages` array, which contains details of individual outages present. Fields for these individual outages include:
| Outage Field | Description |
|-----------------|--------------------------------------------------------------|
| outageType | Outage type (e.g. 'Planned', 'Fault', 'Restored') |
| location | Outage location |
| plannerGroup | Region |
| numCustAffected | Number of customers affected |
| startTime | Outage start time |
| estRestoreTime | Estimated restoration time |
| statusMessage | Status Message |
| restoreTime | Restoration time (only for outages of outageType `Restored`) |
| numCustAffected | Number of customers affected |## Sample Automation to notify about nearby outages
```yaml
alias: ESB Outage Notifications
description: ""
trigger:
- platform: state
entity_id:
- sensor.esb_faults_sensor
attribute: outages
condition: []
action:
- service: notify.notify
data:
title: ⚡ ESB Outage Notification ⚡
message: >-
Type: {{state_attr('sensor.esb_faults_sensor', 'outages')[0].type}},
Location: {{state_attr('sensor.esb_faults_sensor',
'outages')[0].location}}, Distance:
{{state_attr('sensor.esb_faults_sensor', 'outages')[0].distance}} KM,
Estimated Restore: {{state_attr('sensor.esb_faults_sensor',
'outages')[0].estRestoreTime}}
mode: single
```