Processes water outages from Tavos and provides them inside Home Assistant
Copy contents of custom_components/tavos_water_outage/ to custom_components/tavos_water_outage/ in your Home Assistant config folder.
HACS is a community store for Home Assistant. You can install HACS and then install Tavos Water Outage from the HACS store.
Add monitored cities or streats via Integrations (search for Tavos) in Home Assistant UI.
To add multiple monitored cities or streets, add integration multiple times.
Sensor entities in format of sensor.tavoswater_outagecity/street will be created.
- State of the entity becomes nonempty if there is upcoming water outage for that monitored city/street
- Attribute "outages" of the entity lists all the current outages
- Attribute "last_update" of the entity shows the last time the website has been updated and whether there are no current outages.
Automation to notify as soon when there is an upcoming outage in monitored city / street and then every day at 5pm:
- id: "1551393505029"
alias: Send Water Outage Alert
trigger:
- at: "17:00:00"
platform: time
- platform: template
value_template: "{{ states('sensor.tavos_water_outage_city')|string != '' }}"
condition:
- condition: template
value_template: "{{ states('sensor.tavos_water_outage_city')|string != '' }}"
action:
- data_template:
message:
"Water outage alert: {{ states('sensor.tavos_water_outage_city')|string
}}"
service: notify.facebook
Project and/or author is in no way associated with Tavos and provides this code completely free, according to LICENSE file.