Allergy Card for Lovelace

Spent a little while the other day and came up with a nice display for all of the data provided by the pollen.com sensor.

In addition to configuring the pollen.com sensor you’ll need to be running HA 0.80 for the gauge card and need to add Marius’ custom entity attributes card from https://github.com/ciotlosm/custom-lovelace/tree/master/entity-attributes-card to your configuration.

Add this to packages/pollen.yaml:

sensor:
  platform: pollen
  zip_code: "90210"
  monitored_conditions:
    - allergy_average_forecasted
    - allergy_average_historical
    - allergy_index_today
    - allergy_index_tomorrow
    - allergy_index_yesterday
    - disease_average_forecasted

Add this to ui-lovelace.yaml:

  - title: Allergy
    id: allergy
    icon: mdi:flower
    panel: true
    cards:
      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: "## Yesterday"
                  - type: gauge
                    entity: sensor.allergy_index_yesterday
                    title: Yesterday
                    min: 0
                    max: 12
                    unit_of_measurement: " "
                    severity:
                      green: 0.0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    filter:
                      include:
                        - key: sensor.allergy_index_yesterday.rating
                          name: Rating
                        - key: sensor.allergy_index_yesterday.allergen_genus_1
                          name: Allergen Genus
                        - key: sensor.allergy_index_yesterday.allergen_name_1
                          name: Allergen Name
                        - key: sensor.allergy_index_yesterday.allergen_type_1
                          name: Allergen Type

              - type: vertical-stack
                cards:
                  - type: markdown
                    content: "## Today"
                  - type: gauge
                    entity: sensor.allergy_index_today
                    title: Today
                    min: 0
                    max: 12
                    unit_of_measurement: " "
                    severity:
                      green: 0.0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    filter:
                      include:
                        - key: sensor.allergy_index_today.rating
                          name: Rating
                        - key: sensor.allergy_index_today.allergen_genus_1
                          name: Allergen Genus
                        - key: sensor.allergy_index_today.allergen_name_1
                          name: Allergen Name
                        - key: sensor.allergy_index_today.allergen_type_1
                          name: Allergen Type

              - type: vertical-stack
                cards:
                  - type: markdown
                    content: "## Tomorrow"
                  - type: gauge
                    entity: sensor.allergy_index_tomorrow
                    title: Tomorrow
                    min: 0
                    max: 12
                    unit_of_measurement: " "
                    severity:
                      green: 0.0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    filter:
                      include:
                        - key: sensor.allergy_index_tomorrow.rating
                          name: Rating
                        - key: sensor.allergy_index_tomorrow.allergen_genus_1
                          name: Allergen Genus
                        - key: sensor.allergy_index_tomorrow.allergen_name_1
                          name: Allergen Name
                        - key: sensor.allergy_index_tomorrow.allergen_type_1
                          name: Allergen Type

          - type: horizontal-stack
            cards:
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: "## Historical Average"
                  - type: gauge
                    entity: sensor.allergy_index_historical_average_2
                    title: Historical
                    min: 0
                    max: 12
                    unit_of_measurement: " "
                    severity:
                      green: 0.0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    filter:
                      include:
                        - key: sensor.allergy_index_historical_average_2.rating
                          name: Rating
                        - key: sensor.allergy_index_historical_average_2.trend
                          name: Trend

              - type: vertical-stack
                cards:
                  - type: markdown
                    content: "## Forecasted Average"
                  - type: gauge
                    entity: sensor.allergy_index_forecasted_average_2
                    title: Forecasted
                    min: 0
                    max: 12
                    unit_of_measurement: " "
                    severity:
                      green: 0.0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    filter:
                      include:
                        - key: sensor.allergy_index_forecasted_average_2.rating
                          name: Rating
                        - key: sensor.allergy_index_forecasted_average_2.trend
                          name: Trend
                        - key: sensor.allergy_index_forecasted_average_2.season
                          name: Season
                        - key: sensor.allergy_index_forecasted_average_2.outlook
                          name: Outlook
6 Likes

Shame pollen.com is so selective about where it reports.

2 Likes

Great stuff, your lovelace config has a few too many _2 in there for:

  • historical_average
  • forecasted_average

Can you be more specific on what you mean by too many _2’s? That’s how my sensors show up for the historical average and the forecasted average.

I can’t seem to include a custom:entity-attributes-card card within vertical-stack card; I get this:

Did you run into this at any point?

No, I never saw anything like that on this. Check to make sure that your pollen sensor is working in the developer section.

Update to 0.81.1 to fix this error.

That did it. Thank you!

You have a _2 at the end of some of your sensors, e.g. allergy_index_historical_average_2

This might be the result of the way you experimented with them when you set them up.
i set up mine from scratch and bot sensors, i.e. allergy_index_historical_average_2 and allergy_index_forecasted_average_2 , do not have the _2 add-on.

Just wanted to say thank you for this. Slowly putting together my dashboards and this saved me a bit of hair pulling.

This is great! I used it but changed the “vertical-stack” cards to “custom:vertical-stack-in-card” which helped to keep the information together better visually.

is the outlook portion working for you? I’m no longer show the sensor outlook which was under allergy_index_forecasted_average_2 in my setup and I don’t see it in the documentation either?

Iqvia

I get an error saying an integration for pollen doesn’t exist. Looks like it works for the most part with data from IVQIA but without any historical data… any thoughts?

IVQIA/pollen has changed a few times over the course of this thread. With the current integration, here is a view, based on Jeff’s view, I’m using to present the data:

title: Allergy
id: allergy
icon: mdi:flower
panel: true
cards:
  - type: vertical-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: vertical-stack
            cards:
              - type: markdown
                content: "## Allergens Today"
              - type: gauge
                entity: sensor.allergy_index_today
                title: Today
                min: 0
                max: 12
                unit_of_measurement: " "
                severity:
                  green: 0.0
                  yellow: 4.8
                  red: 9.7
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: sensor.allergy_index_today.rating
                      name: Rating
                    - key: sensor.allergy_index_today.allergen_name_1
                      name: Allergen One
                    - key: sensor.allergy_index_today.allergen_name_2
                      name: Allergen Two
                    - key: sensor.allergy_index_today.allergen_name_3
                      name: Allergen Three
          - type: vertical-stack
            cards:
              - type: markdown
                content: "## Allergens Tomorrow"
              - type: gauge
                entity: sensor.allergy_index_tomorrow
                title: Tomorrow
                min: 0
                max: 12
                unit_of_measurement: " "
                severity:
                  green: 0.0
                  yellow: 4.8
                  red: 9.7
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: sensor.allergy_index_tomorrow.rating
                      name: Rating
                    - key: sensor.allergy_index_tomorrow.allergen_name_1
                      name: Allergen One
                    - key: sensor.allergy_index_tomorrow.allergen_name_2
                      name: Allergen Two
                    - key: sensor.allergy_index_tomorrow.allergen_name_3
                      name: Allergen Three
          - type: vertical-stack
            cards:
              - type: markdown
                content: "## Allergen Forecast"
              - type: gauge
                entity: sensor.allergy_index_forecasted_average
                title: Forecasted
                min: 0
                max: 12
                unit_of_measurement: " "
                severity:
                  green: 0.0
                  yellow: 4.8
                  red: 9.7
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: sensor.allergy_index_forecasted_average.rating
                      name: Rating
                    - key: sensor.allergy_index_forecasted_average.trend
                      name: Trend
                    - key: sensor.allergy_index_forecasted_average.season
                      name: Season
                    - key: sensor.allergy_index_forecasted_average.outlook
                      name: Outlook
      - type: horizontal-stack
        cards:
          - type: vertical-stack
            cards:
              - type: markdown
                content: "## Asthma Today"
              - type: gauge
                entity: sensor.asthma_index_today
                title: Yesterday
                min: 0
                max: 12
                unit_of_measurement: " "
                severity:
                  green: 0.0
                  yellow: 4.8
                  red: 9.7
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: sensor.asthma_index_today.rating
                      name: Rating
                    - key: sensor.asthma_index_today.allergen_name_1
                      name: Irritant
                    - key: sensor.asthma_index_today.allergen_amount_1
                      name: Level

          - type: vertical-stack
            cards:
              - type: markdown
                content: "## Asthma Tomorrow"
              - type: gauge
                entity: sensor.asthma_index_tomorrow
                title: Today
                min: 0
                max: 12
                unit_of_measurement: " "
                severity:
                  green: 0.0
                  yellow: 4.8
                  red: 9.7
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: sensor.asthma_index_tomorrow.rating
                      name: Rating

          - type: vertical-stack
            cards:
              - type: markdown
                content: "## Asthma Forecast"
              - type: gauge
                entity: sensor.asthma_index_forecasted_average
                title: Tomorrow
                min: 0
                max: 12
                unit_of_measurement: " "
                severity:
                  green: 0.0
                  yellow: 4.8
                  red: 9.7
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: sensor.asthma_index_forecasted_average.rating
                      name: Rating

3 Likes

Does this still work for you? I can’t seem to install the integration at all…

Are you still using this?
Curious with all the changes over the years.

Sorry for the delay - I am no longer using this card or API…

I’m using this as a starting point for my IQVIA integration. There were a few small issues with changes that must have been made to the entity-attributes-card. Heading_name and heading_state now need to be specified, so thought it was worth a quick update here in case it saves others time.

  - title: Allergy
    icon: mdi:flower-pollen
    panel: true
    cards:
      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: '## Allergens Today'
                  - type: gauge
                    entity: sensor.allergy_index_today
                    title: Today
                    min: 0
                    max: 12
                    unit_of_measurement: ' '
                    severity:
                      green: 0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    heading_name: Attributes
                    heading_state: States
                    filter:
                      include:
                        - key: sensor.allergy_index_today.rating
                          name: Rating
                        - key: sensor.allergy_index_today.allergen_name_1
                          name: Allergen One
                        - key: sensor.allergy_index_today.allergen_name_2
                          name: Allergen Two
                        - key: sensor.allergy_index_today.allergen_name_3
                          name: Allergen Three
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: '## Allergens Tomorrow'
                  - type: gauge
                    entity: sensor.allergy_index_tomorrow
                    title: Tomorrow
                    min: 0
                    max: 12
                    unit_of_measurement: ' '
                    severity:
                      green: 0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    heading_name: Attributes
                    heading_state: States
                    filter:
                      include:
                        - key: sensor.allergy_index_tomorrow.rating
                          name: Rating
                        - key: sensor.allergy_index_tomorrow.allergen_name_1
                          name: Allergen One
                        - key: sensor.allergy_index_tomorrow.allergen_name_2
                          name: Allergen Two
                        - key: sensor.allergy_index_tomorrow.allergen_name_3
                          name: Allergen Three
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: '## Allergen Forecast'
                  - type: gauge
                    entity: sensor.allergy_index_forecasted_average
                    title: Forecasted
                    min: 0
                    max: 12
                    unit_of_measurement: ' '
                    severity:
                      green: 0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    heading_name: Attributes
                    heading_state: States
                    filter:
                      include:
                        - key: sensor.allergy_index_forecasted_average.rating
                          name: Rating
                        - key: sensor.allergy_index_forecasted_average.trend
                          name: Trend
                        - key: sensor.allergy_index_forecasted_average.season
                          name: Season
                        - key: sensor.allergy_index_forecasted_average.outlook
                          name: Outlook
          - type: horizontal-stack
            cards:
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: '## Asthma Today'
                  - type: gauge
                    entity: sensor.asthma_index_today
                    title: Yesterday
                    min: 0
                    max: 12
                    unit_of_measurement: ' '
                    severity:
                      green: 0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    heading_name: Attributes
                    heading_state: States
                    filter:
                      include:
                        - key: sensor.asthma_index_today.rating
                          name: Rating
                        - key: sensor.asthma_index_today.allergen_name_1
                          name: Irritant
                        - key: sensor.asthma_index_today.allergen_amount_1
                          name: Level
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: '## Asthma Tomorrow'
                  - type: gauge
                    entity: sensor.asthma_index_tomorrow
                    title: Today
                    min: 0
                    max: 12
                    unit_of_measurement: ' '
                    severity:
                      green: 0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    heading_name: Attributes
                    heading_state: States
                    filter:
                      include:
                        - key: sensor.asthma_index_tomorrow.rating
                          name: Rating
              - type: vertical-stack
                cards:
                  - type: markdown
                    content: '## Asthma Forecast'
                  - type: gauge
                    entity: sensor.asthma_index_forecasted_average
                    title: Tomorrow
                    min: 0
                    max: 12
                    unit_of_measurement: ' '
                    severity:
                      green: 0
                      yellow: 4.8
                      red: 9.7
                  - type: custom:entity-attributes-card
                    heading_name: Attributes
                    heading_state: States
                    filter:
                      include:
                        - key: sensor.asthma_index_forecasted_average.rating
                          name: Rating
1 Like