Public repository staging copy for the Home Assistant custom integration that tracks Ternopil outage schedules and compares them against a live power probe.
Intended public repo name: home-assistant-ternopil-grid.
custom_components/ternopil_grid/- the integration source
- translations
- diagnostics
- config flow
- probe logic
- the const-contract check script
examples/power-grid-card.yaml- the current
Power Griddashboard block
- the current
examples/lease-source.example.json- portable sample input for the external DHCP / lease resolver
tools/export_oe_outage_data.py- standalone export to
OE_OUTAGE_DATA-compatible JSON
- standalone export to
data/Ternopil.json- generated outage snapshot for external consumers
LICENSECHANGELOG.md
- HomeLAB-wide dashboards outside the
Power Gridblock - shared HomeLAB Telegram bridge packages
- Proxmox outage automation packages
- NAS/router deploy scripts
Those stay in the main HomeLAB repo because they are environment-specific.
.
|-- LICENSE
|-- README.md
|-- .gitignore
|-- CHANGELOG.md
|-- hacs.json
|-- custom_components/
| `-- ternopil_grid/
| |-- __init__.py
| |-- api.py
| |-- binary_sensor.py
| |-- config_flow.py
| |-- const.py
| |-- CONTRACT.md
| |-- coordinator.py
| |-- diagnostics.py
| |-- manifest.json
| |-- ping.py
| |-- select.py
| |-- sensor.py
| |-- tools/
| `-- translations/
`-- examples/
`-- power-grid-card.yaml
python -m compileall .\custom_components\ternopil_grid
python .\custom_components\ternopil_grid\tools\verify_const_contract.py
python .\custom_components\ternopil_grid\tools\verify_repo_assets.py
python .\tools\verify_oe_outage_data.py
python .\tools\export_oe_outage_data.py- generated file path:
data/Ternopil.json - generator:
tools/export_oe_outage_data.py - source: live PowerOn API for Ternopil streets, outage groups, and schedules
- update model:
.github/workflows/update-oe-outage-data.ymlpolls every 6 hours and commits only when the exported JSON actually changes
This keeps the export low-noise on stable days while still refreshing regularly from the live PowerOn API.
- Copy
custom_components/ternopil_gridinto your Home Assistantcustom_components/directory. - Restart Home Assistant.
- Add the
Ternopil Grid Scheduleintegration from the UI. - Optionally import or adapt
examples/power-grid-card.yamlinto your dashboard.
Dashboard overview and current schedule cards, plus the options menu and an earlier card version.
Add this repo to HACS as a custom integration repository:
- Repository:
yshved-stack/home-assistant-ternopil-grid - Category:
Integration
- release tags follow the integration version from
custom_components/ternopil_grid/manifest.json - current public release tag:
v1.2.4 - human-readable release notes live in CHANGELOG.md
- Street selection stays in the integration settings and as a config
selectentity. - The live power probe can use ICMP, TCP, HTTP, or entity-state checks.
- Optional external lease resolution is available for standalone installs via
DHCP / lease resolver. - Resolver order is
entity IP -> DHCP/lease source -> saved manual fallback IP. house_numberis currently stored for context/title only. If a street maps to multiple outage groups, select the correctOutage Groupexplicitly until the upstream API exposes house-level resolution.- The dashboard block is intentionally focused on the outage view only; broader homelab logic belongs in the parent repo.
When a selected Home Assistant device does not expose its IP directly, the integration can optionally resolve it from an external lease source.
Supported source types:
Lease JSON URLLease JSON file path
Supported lookup strategies:
autohostnamemacentity_id
You can also provide an optional Lookup override when the automatic hints from the selected entity are not enough.
Example lease payload: examples/lease-source.example.json



