Skip to content

Water quality integration for Home Assistant with data provided by Budapest FVM

License

Notifications You must be signed in to change notification settings

amaximus/water_quality_fvm

Repository files navigation

hacs_badge

Buy me a coffee

Water Quality FVM (Budapest, HU) custom integration for Home Assistant

This custom component integrates water quality information provided by Budapest Water Company (FVM - Fővárosi Vízművek).

The state of the sensor will be the number of monitored items above their threshold. Thresholds are defined on the FVM vízminőség, vízkeménység page (see below).

State of a water quality element can be either ok or out of range.

Water hardness value is listed with other monitored elements, while the human readable water hardness string is listed as a standalone attribute.

Installation

The easiest way to install it is through HACS (Home Assistant Community Store), search for Water Quality FVM in the Integrations.

Configuration:

Define sensor with the following configuration parameters:


Name Optional Default Description
name Y water_quality_fvm name of the sensor
region Y Budapest - I. kerület region string (see below)
ssl Y true control SSL verification. This is useful when CA store update with new root/intermediate certificates is problematic. WARNING: setting this to false is a security breach.

Region should match the location specified at FVM vízminőség, keménység.

Example of water quality information:

Water quality attributes

Examples

platform: water_quality_fvm
region: 'Budapest - XXII. kerület'

Example Lovelace UI conditional custom button card:

type: conditional
conditions:
  - entity: sensor.water_quality_fvm
    state_not: '0'
card:
  type: custom:button-card
  color_type: icon
  show_label: true
  show_name: false
  show_icon: true
  entity: sensor.water_quality_fvm
  size: 30px
  styles:
    label:
      - font-size: 90%
      - text-align: left
    card:
      - height: 80px
    icon:
      - color: var(--paper-item-icon-active-color)
  layout: icon_label
  label: >
    [[[
      var label = ""
      var w_alerts = states['sensor.water_quality_fvm'].attributes.water_quality;
      for (var k=0; k < states['sensor.water_quality_fvm'].state; k++) {
        if ( w_alerts[k].state != "ok" ) {
          label += w_alerts[k].name + ": " + w_alerts[k].value + " " +
                   w_alerts[k].unit + "&nbsp;&nbsp;(" + w_alerts[k].limit +
                   " " + w_alerts[k].unit + ")" + `<br>`
        }
      }
      return label;
    ]]]

Thanks

Thanks to all the people who have contributed!

contributors