Skip to content

Home Assistant custom component for Pollen Information in Hungary

License

Notifications You must be signed in to change notification settings

amaximus/pollen_hu

Repository files navigation

hacs_badge

Buy me a coffee

Home Assistant custom component for pollen information in Hungary

This custom component gathers pollen information in Hungary from antsz.hu.

The state of the sensor will be the level of most dominant pollen. The name of the pollen with highest concentration level will also be added into dedicated attributes.

The sensor will also report in an attribute the values of all other pollens.

Installation

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

Sensor of this platform should be configured as per below information.

Configuration:

Define sensor with the following configuration parameters:


Name Optional Default Description
name Y pollen_hu name of the sensor
all_dominant Y False gather all dominant pollens. By the default it will show the first dominant pollen even if there are others too.
pollens Y `` list of pollen names to filter on.
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.

Example

platform: pollen_hu
name: 'Pollen adatok'
pollens:
  - Parlagfű
  - Alternaria

Lovelace UI

There is a Lovelace custom card related to this component at https://github.com/amaximus/pollen-hu-card.

If you want to show only the dominant pollen you may skip using the pollen-hu-card and use the following:

type: conditional
conditions:
  - entity: sensor.pollen
    state_not: '0'
  - entity: sensor.pollen
    state_not: '1'
  - entity: sensor.pollen
    state_not: '2'
card:
  type: custom:button-card
  icon: mdi:blur
  size: 30px
  styles:
    label:
      - font-size: 90%
    card:
      - height: 80px
    icon:
      - color: red
  label: >
    [[[
      var pollen = states['sensor.pollen'].attributes.dominant_pollen;
      return pollen;
    ]]]
  show_label: true
  show_name: false
  entity: sensor.pollen
  color_type: icon

Custom Lovelace card example:

Pollen information above medium concentration

Thanks

Thanks to all the people who have contributed!

contributors