JurajNyiri / HomeAssistant-Tavos

Sensor which gathers water outage information from Tavos (Slovakia) website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tavos_water_outage Home Assistant sensor

Processes water outages from Tavos and provides them inside Home Assistant

Installation

Copy contents of custom_components/tavos_water_outage/ to custom_components/tavos_water_outage/ in your Home Assistant config folder.

Installation using HACS

HACS is a community store for Home Assistant. You can install HACS and then install Tavos Water Outage from the HACS store.

Usage

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.

Usage example

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

Disclaimer

Project and/or author is in no way associated with Tavos and provides this code completely free, according to LICENSE file.

About

Sensor which gathers water outage information from Tavos (Slovakia) website

License:Apache License 2.0


Languages

Language:Python 100.0%