Pollenflug Sensor anlegen aber wie?

Hallo,

habe Probleme wie ich die Daten der einzelnen Pollen weiterverarbeiten soll… das ich mir jeweils immer einen Sensor anlegen kann.
Müsste da ja was in yaml anlegen…

Die Pollendaten hab ich schon eine Entität siehe Bild. Wird über DWD Opden Data geladen…

Evtl kann mir jemand ja was schreiben das ich nur die Pollennamen austauschen kann…
Das wäre super…

1 „Gefällt mir“

Es gibt da eine Integration für, dann hast Du die Entitäten für die entsprechen Pollenarten.

https://github.com/mampfes/hacs_dwd_pollenflug

Oder was meinst Du genau?

1 „Gefällt mir“

Ok wusste ich gar nicht danke schau da mal nach…evtl bekomm ich es ja damit hin… :+1:

Da ich das Thema selbst noch offen hatte, mal eben was gebaut.

Du kannst Dir das dann per conditional und markdown im Dashboard anzeigen lassen, falls eine Belastung für den Tag vorhanden ist.

- type: conditional
  conditions:
    - entity: sensor.pollenflug_roggen_42
      state_not: '0'
  card:
    type: markdown
    content: |-
      {% if states("sensor.pollenflug_roggen_42") | float(0) > 0 %}
        {% set state_today_desc = state_attr("sensor.pollenflug_roggen_42", "state_today_desc") %}
        {% set state = states("sensor.pollenflug_roggen_42") | float(0) %}
        🌼 Roggenpollen stellen heute {% if state != 0.5 %}eine {%endif %}{{ state_today_desc }} für Allergiker dar.
      {% endif %}

Oder

      - type: conditional
        conditions:
          - entity: sensor.pollenflug_graeser_42
            state_not: '0'
        card:
          type: markdown
          content: |-
            {% if states("sensor.pollenflug_graeser_42") | float(0) > 0 %}
              {% set state_today_desc = state_attr("sensor.pollenflug_graeser_42", "state_today_desc") %}
              {% set state = states("sensor.pollenflug_graeser_42") | float(0) %}
              🌼 Gräserpollen stellen heute {% if state != 0.5 %}eine {%endif %}{{ state_today_desc }} für Allergiker dar.
            {% endif %}

Wenn man markdown über conditional ausblenden möchte, falls keine Belastung vorhanden ist, muss leider für jede Pollenart eine eigene Karte erstellt werden. Ist aber bei allen anderen Sachen, wie Waschmaschine, Trocker, verschiedene 3D-Drucker auch so. Das ist immer UND-verknüpft.

1 „Gefällt mir“

ich hab die mir so angelegt damals.

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_ambrosia_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_ambrosia_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Ambrosia
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
          badge_color: green
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_beifuss_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_beifuss_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Beifuss
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
          badge_color: ''
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_birke_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_birke_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Birke
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
          badge_color: green
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_erle_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_erle_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Erle
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
          badge_color: ''
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_esche_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_esche_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Esche
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_graeser_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_graeser_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Gräser
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_hasel_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_hasel_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Haselnuss
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false
  - type: conditional
    conditions:
      - entity: sensor.pollenflug_roggen_102
        state_not: '0'
    card:
      type: vertical-stack
      cards:
        - type: custom:mushroom-template-card
          entity: sensor.pollenflug_roggen_102
          icon_color: red
          icon: mdi:tree-outline
          primary: Roggen
          secondary: |
            {% set d ={
            '0': 'keine Belastung',
            '0.5': 'keine bis geringe Belastung',
            '1': 'geringe Belastung',
            '1.5': 'geringe bis mittlere Belastung',
            '2': 'mittlere Belastung',
            '2.5': 'mittlere bis hohe Belastung',
            '3': 'hohe Belastung',
            } %}
            {{ d.get(states(entity)) }}
          tap_action:
            action: none
          hold_action:
            action: none
          double_tap_action:
            action: none
          multiline_secondary: false
          fill_container: false

1 „Gefällt mir“

@anon90710413 , @seebaer1976

Danke Euch beiden habt mir sehr weitergeholfen… vielen Dank !:+1:

Konntest du das über HACS installieren? Bei mir kommt da immer ein timeout, die anderen Repos gehen ohne Probleme

@MelleD Ich hab das jetzt über HA Integration DWD installiert das funktioniert bis jetzt…
Und die Katen von @seebaer1976 verwendet…
Und nur mein Gebiet umgeschrieben…

@MelleD habe das nur unter Geräte Integration installiert.Das ging alles automatisch wurde nur über das Bundesland noch gefragt das wars.

Hat nicht gleich funktioniert erst nach Neustart von HA. So war es zumindest bei mir…

Ja aber du musst die Integration manuell oder über HACS erst installieren.
Über HACS ging es nicht, manuell in den richtigen Ordner kopieren hat getan

Ich greife das Thema hier noch einmal auf - ich habe heute auch den Pollenrader des DWD im Dashboard, allerdings liefert diese ja nur 8 Werte…gibt es da noch Möglichkeiten von Integrationen mit mehr Pollenarten? Auf meinem Smartphone nutze ich z.B. die Pollenapp von Ratiopharm.