Skip to content

Latest commit

 

History

History
74 lines (59 loc) · 3.15 KB

File metadata and controls

74 lines (59 loc) · 3.15 KB

hacs_badge

Buy me a coffee

Home Assistant custom integration for fire protection in Hungary

This custom component provides fire protection information from nebih.gov.hu based on county (valid only for Hungary).

The state of the sensor will be the fire ban level of the county set (0: no restriction; 1: fire ban).

Installation

The easiest way to install it is through HACS (Home Assistant Community Store), search for Fire Protection Hungary in the Integrations.

Configuration:

Define sensor with the following configuration parameters:


Name Optional Default Description
name Y fire_protection_hu name of the sensor
county_id Y 20 county identifier

county_id is the value from list (they could not sort it alphabetically):
1: Bács-Kiskun; 2: Baranya; 3: Békés; 4: Borsod-Abaúj-Zemplén; 5: Csongrád; 6: Fejér; 7: Győr-Moson-Sopron; 8: Hajdú-Bihar; 9: Heves; 10: Komárom-Esztergom; 11: Nógrád; 12: Pest; 13: Somogy; 14: Szabolcs-Szatmár-Bereg; 15: Jász-Bácskun-Szolnok; 16: Tolna; 17: Vas; 18: Veszprém; 19: Zala; 20: Budapest).

Meteo alerts attributes

Example

platform: fire_protection_hu
county_id: 12 # Pest county

Lovelace UI

If you want to show an alert use the following:

type: conditional
conditions:
  - entity: sensor.fire_protection_hu
    state_not: '0'
card:
  type: custom:button-card
  size: 30px
  styles:
    label:
      - font-size: 90%
    card:
      - height: 80px
    icon:
      - color: >
          [[[
            var f_level = states['sensor.fire_protection_hu'].state;
            if ( f_level == 0 ) {
              return "var(--paper-item-icon-color)";
            } else if ( f_level == 1 ) {
              return "var(--paper-item-icon-active-color)";
            }
            return "black";
          ]]]
  label: "Tűzgyújtási tilalom"
  show_label: true
  show_name: false
  entity: sensor.fire_protection_hu
  color_type: icon

Thanks

Thanks to all the people who have contributed!

contributors