Skip to content

frimtec/hass-swiss-pollen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swiss Pollen integration for Home Assistant

hacs_badge Project Maintenance License

Downloads Downloads

Build Status Deploy Status

A Home Assistant integration that provides pollen data for Switzerland from MeteoSchweiz. Data integration is done via swiss-pollen.

This integration is not officially developed, supported or endorsed by MeteoSchweiz.

Features

  • Provides pollen concentration data for various plant types in Switzerland
  • Data is sourced from MeteoSchweiz
  • Supports multiple measurement stations across Switzerland
  • Provides both numeric values (No/m³) and categorical levels (None, Low, Medium, Strong, Very Strong)

Installation

HACS (recommended)

You can install this component through HACS to easily receive updates. Once HACS is installed, click this link: Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Manual Installation

  1. Download the latest release from the releases page
  2. Unpack the release and copy the custom_components/swiss_pollen directory into your Home Assistant's custom_components directory
  3. Restart Home Assistant

Configuration

  1. Go to Settings > Devices & Services
  2. Click "Add Integration"
  3. Search for "Swiss Pollen"
  4. Follow the configuration flow to set up a service for a specific plant:
    • Select a plant of interest
    • Select one or more measurement stations to get sensors for these stations
  5. You can repeat step 4) to set up multiple services, one for each plant you are interested in

Available Sensors

For each selected plant, the integration creates the following sensors:

  1. Numeric concentration (sensor/location): Shows the pollen concentration in No/m³ (number per cubic meter)

    • Icon: mdi:flower-pollen
  2. Level (sensor/location): Shows the categorical level of pollen concentration

    • Possible values: None, Low, Medium, Strong, Very Strong
    • Icon: mdi:flag
  3. Plant season (binary sensor): Shows whether the plant has pollen season or not. The sensor is 'on' if at least one station in Switzerland reports a value greater than zero).

  4. Backend version (diagnostic sensor): Shows the version of the backend providing the pollen data.

Example Dashboard

Standard UI

dashboard-example.png

YAML-Code
- type: grid
  cards:
    - type: heading
      heading: 🌳Pollen
      heading_style: title
    - type: markdown
      content: >-
        <img
        src="https://raw.githubusercontent.com/frimtec/hass-swiss-pollen/refs/heads/main/images/grass.png"
        alt="Gräser" width="55" height="70">

        &nbsp;&nbsp;&nbsp;Gräser
      grid_options:
        columns: 3
        rows: 2
    - type: horizontal-stack
      cards:
        - type: tile
          name: Zürich
          entity: sensor.graser_zurich_konzentration
          features_position: bottom
          vertical: false
          hide_state: false
        - type: tile
          name: Zürich
          entity: sensor.graser_zurich_stufe
          features_position: bottom
          vertical: false
      grid_options:
        columns: 9
        rows: auto
    - type: horizontal-stack
      cards:
        - type: tile
          name: Bern
          entity: sensor.graser_bern_konzentration
          features_position: bottom
          vertical: false
        - type: tile
          name: Bern
          entity: sensor.graser_bern_stufe
          features_position: bottom
          vertical: false
      grid_options:
        columns: 9
        rows: auto
    - type: markdown
      content: >-
        <img
        src="https://raw.githubusercontent.com/frimtec/hass-swiss-pollen/refs/heads/main/images/birch.png"
        alt="Birke" width="55" height="70">

        &nbsp;&nbsp;&nbsp;Birke
      grid_options:
        columns: 3
        rows: 2
    - type: horizontal-stack
      cards:
        - type: tile
          name: Zürich
          entity: sensor.birch_zurich
          features_position: bottom
          vertical: false
        - type: tile
          name: Zürich
          entity: sensor.birch_zurich_2
          features_position: bottom
          vertical: false
      grid_options:
        columns: 9
        rows: auto
    - type: horizontal-stack
      cards:
        - type: tile
          name: Bern
          entity: sensor.birch_bern
          features_position: bottom
          vertical: false
        - type: tile
          name: Bern
          entity: sensor.birch_bern_2
          features_position: bottom
          vertical: false
      grid_options:
        columns: 9
        rows: auto

Mushroom

Requires HACS component lovelace-mushroom.

dashboard-example.png

YAML-Code
- type: grid
  cards:
    - type: heading
      heading: 🌳Pollen
      heading_style: title
    - type: custom:mushroom-template-card
      grid_options:
        columns: 2
        rows: 1
      tap_action:
        action: none
      layout: vertical
    - type: custom:mushroom-template-card
      icon: mdi:city
      primary: Zürich
      grid_options:
        columns: 5
        rows: 1
      tap_action:
        action: none
      hold_action:
        action: none
      double_tap_action:
        action: none
    - type: custom:mushroom-template-card
      icon: mdi:city
      primary: Bern
      grid_options:
        columns: 5
        rows: 1
      tap_action:
        action: none
      hold_action:
        action: none
      double_tap_action:
        action: none
    - type: custom:mushroom-template-card
      grid_options:
        columns: 2
        rows: 1
      layout: vertical
      picture: >-
        https://raw.githubusercontent.com/frimtec/hass-swiss-pollen/refs/heads/main/images/grass.png
      badge_icon: |-
        {% set state = states('binary_sensor.graser_saison') %}
        {% if state == 'on' %}
        mdi:flower-pollen  
        {% endif %}
      badge_color: |-
        {% set state = states('binary_sensor.graser_saison') %}
        {% if state == 'on' %}
        green 
        {% endif %}
      entity: binary_sensor.graser_saison
      tap_action:
        action: more-info
    - type: custom:mushroom-template-card
      icon: mdi:flower-pollen
      entity: sensor.graser_zurich_konzentration
      primary: '{{ state_translated(''sensor.graser_zurich_stufe'') }}'
      secondary: '{{ states(''sensor.graser_zurich_konzentration'') }} No/m³'
      grid_options:
        columns: 5
        rows: 1
      tap_action:
        action: more-info
      icon_color: |-
        {% set state = states('sensor.graser_zurich_stufe') %}
        {% if state == 'none' %}
        grey  
        {% elif state == 'low' %}
        blue
        {% elif state == 'medium' %}
        yellow
        {% elif state == 'strong' %}
        orange
        {% elif state == 'very_strong' %}
        red
        {% endif %}
    - type: custom:mushroom-template-card
      icon: mdi:flower-pollen
      entity: sensor.graser_bern_konzentration
      primary: '{{ state_translated(''sensor.graser_bern_stufe'') }}'
      secondary: '{{ states(''sensor.graser_bern_konzentration'') }} No/m³'
      grid_options:
        columns: 5
        rows: 1
      tap_action:
        action: more-info
      icon_color: |-
        {% set state = states('sensor.graser_bern_stufe') %}
        {% if state == 'none' %}
        grey  
        {% elif state == 'low' %}
        blue
        {% elif state == 'medium' %}
        yellow
        {% elif state == 'strong' %}
        orange
        {% elif state == 'very_strong' %}
        red
        {% endif %}
    - type: custom:mushroom-template-card
      grid_options:
        columns: 2
        rows: 1
      layout: vertical
      picture: >-
        https://raw.githubusercontent.com/frimtec/hass-swiss-pollen/refs/heads/main/images/birch.png
      badge_icon: |-
        {% set state = states('binary_sensor.birke_saison') %}
        {% if state == 'on' %}
        mdi:flower-pollen  
        {% endif %}
      badge_color: >-
        {% set state =
        states('binary_sensor.meteoswiss_pollen_for_birch_saison') %}
        {% if state == 'on' %}
        green
        {% endif %}
      entity: binary_sensor.birke_saison
      tap_action:
        action: more-info
    - type: custom:mushroom-template-card
      icon: mdi:flower-pollen
      entity: sensor.birke_zurich_konzentration
      primary: '{{ state_translated(''sensor.birke_zurich_stufe'') }}'
      secondary: '{{ states(''sensor.birke_zurich_konzentration'') }} No/m³'
      grid_options:
        columns: 5
        rows: 1
      tap_action:
        action: more-info
      icon_color: |-
        {% set state = states('sensor.birke_zurich_stufe') %}
        {% if state == 'none' %}
        grey  
        {% elif state == 'low' %}
        blue
        {% elif state == 'medium' %}
        yellow
        {% elif state == 'strong' %}
        orange
        {% elif state == 'very_strong' %}
        red
        {% endif %}
    - type: custom:mushroom-template-card
      icon: mdi:flower-pollen
      entity: sensor.birke_bern_konzentration
      primary: '{{ state_translated(''sensor.birke_bern_stufe'') }}'
      secondary: '{{ states(''sensor.birke_bern_konzentration'') }} No/m³'
      grid_options:
        columns: 5
        rows: 1
      tap_action:
        action: more-info
      icon_color: |-
        {% set state = states('sensor.birke_bern_stufe') %}
        {% if state == 'none' %}
        grey  
        {% elif state == 'low' %}
        blue
        {% elif state == 'medium' %}
        yellow
        {% elif state == 'strong' %}
        orange
        {% elif state == 'very_strong' %}
        red
        {% endif %}

About

🌳HomeAssistant integration for pollen data in Switzerland

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages