Skip to content

Fire protection integration for Home Assistant with data provided by NÉBIH

License

Notifications You must be signed in to change notification settings

amaximus/fire_protection_hu

Repository files navigation

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 serial value of the county when counties are sorted alphabetically (1: Baranya, 2: Bács-Kiskun;...; 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