Not an issue, but a request
Closed this issue · 9 comments
Hi @MarcoGos ,
Do you think it is possible to retrieve the forecast as well?
Like they have on their website?
Yeah sure, it’s already there. Look at the Forecast attribute of the sensors in Home Assistant.
how can we show it to the dashboard?
Whoops!
Is there a way to have those attributes on a card? I assume it needs templating. Do you have anything already available please, @MarcoGos ?
Thanks!
Maybe you could do something creative like:
type: grid
cards:
- type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Trees
secondary: ''
icon: mdi:tree
layout: vertical
- type: entities
entities:
- entity: sensor.tree_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.tree_pollen_huis', 'forecast')[0].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[0].value }}'
- entity: sensor.tree_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.tree_pollen_huis', 'forecast')[1].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[1].value }}'
- entity: sensor.tree_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.tree_pollen_huis', 'forecast')[2].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[2].value }}'
- entity: sensor.tree_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.tree_pollen_huis', 'forecast')[3].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[3].value }}'
- type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Grass
secondary: ''
icon: mdi:grass
layout: vertical
- type: entities
entities:
- entity: sensor.grass_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.grass_pollen_huis', 'forecast')[0].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[0].value }}'
- entity: sensor.grass_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.grass_pollen_huis', 'forecast')[1].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[1].value }}'
- entity: sensor.grass_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.grass_pollen_huis', 'forecast')[2].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[2].value }}'
- entity: sensor.grass_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.grass_pollen_huis', 'forecast')[3].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[3].value }}'
- type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Weeds
secondary: ''
icon: mdi:cannabis
layout: vertical
- type: entities
entities:
- entity: sensor.weed_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.weed_pollen_huis', 'forecast')[0].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[0].value }}'
- entity: sensor.weed_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.weed_pollen_huis', 'forecast')[1].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[1].value }}'
- entity: sensor.weed_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.weed_pollen_huis', 'forecast')[2].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[2].value }}'
- entity: sensor.weed_pollen_huis
type: custom:template-entity-row
name: >-
{{ state_attr('sensor.weed_pollen_huis', 'forecast')[3].date |
as_timestamp | timestamp_custom('%A') }}
state: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[3].value }}'
columns: 3
Can u edit above and place it between 3 times a " ` " before and after the code.
Yes here it is .
cards:
- type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Bomen
secondary: '{{states(''sensor.tree_pollen_huis'')}} ppm'
icon: mdi:tree-outline
icon_color: |-
{% if states('sensor.tree_pollen_huis') |
float(0) > 342 %}
brown
{% elif states('sensor.tree_pollen_huis')
| float(0) > 190 %}
red
{% elif states('sensor.tree_pollen_huis')
| float(0) > 130 %}
orange
{% elif states('sensor.tree_pollen_huis')
| float(0) < 50 %}
green
{% else %}
grey
{% endif %}
layout: vertical
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
fill_container: true
picture: ''
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.tree_pollen_huis', 'forecast')[0].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:tree-outline
icon_color: >-
{% if state_attr('sensor.tree_pollen_huis', 'forecast')[0].value |
float(0) > 704 %}
brown
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[0].value | float(0) > 208 %}
red
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[0].value | float(0) > 130 %}
orange
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[0].value | float(0) < 50 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[0].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.tree_pollen_huis', 'forecast')[1].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:tree-outline
icon_color: >-
{% if state_attr('sensor.tree_pollen_huis', 'forecast')[1].value |
float(0) > 704 %}
brown
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[1].value | float(0) > 208 %}
red
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[1].value | float(0) > 130 %}
orange
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[1].value | float(0) < 95 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[1].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.tree_pollen_huis', 'forecast')[2].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:tree-outline
icon_color: >-
{% if state_attr('sensor.tree_pollen_huis', 'forecast')[2].value |
float(0) > 704 %}
brown
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[2].value | float(0) > 208 %}
red
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[2].value | float(0) > 96 %}
orange
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[2].value | float(0) < 95 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[2].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.tree_pollen_huis', 'forecast')[3].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:tree-outline
icon_color: >-
{% if state_attr('sensor.tree_pollen_huis', 'forecast')[3].value |
float(0) > 704 %}
brown
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[3].value | float(0) > 208 %}
red
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[3].value | float(0) > 96 %}
orange
{% elif state_attr('sensor.tree_pollen_huis', 'forecast')[3].value | float(0) < 95 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.tree_pollen_huis'', ''forecast'')[3].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Gras
secondary: '{{states(''sensor.grass_pollen_huis'')}} ppm'
icon: mdi:grass
icon_color: |-
{% if states('sensor.grass_pollen_huis') |
float(0) > 342 %}
brown
{% elif states('sensor.grass_pollen_huis')
| float(0) > 61 %}
red
{% elif states('sensor.grass_pollen_huis')
| float(0) > 30 %}
orange
{% elif states('sensor.grass_pollen_huis')
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
layout: vertical
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
fill_container: true
card_mod:
style: |
ha-card {
background: none;
box-shadow: 0px 0px;
}
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.grass_pollen_huis', 'forecast')[0].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:grass
icon_color: >-
{% if state_attr('sensor.grass_pollen_huis', 'forecast')[0].value
|
float(0) > 342 %}
brown
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[0].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[0].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[0].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[0].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.grass_pollen_huis', 'forecast')[1].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:grass
icon_color: >-
{% if state_attr('sensor.grass_pollen_huis', 'forecast')[1].value
|
float(0) > 342 %}
brown
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[1].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[1].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[1].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[1].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.grass_pollen_huis', 'forecast')[2].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:grass
icon_color: >-
{% if state_attr('sensor.grass_pollen_huis', 'forecast')[2].value
|
float(0) > 342 %}
brown
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[2].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[2].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[2].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[2].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.grass_pollen_huis', 'forecast')[3].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:grass
icon_color: >-
{% if state_attr('sensor.grass_pollen_huis', 'forecast')[3].value
|
float(0) > 342 %}
brown
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[3].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[3].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.grass_pollen_huis', 'forecast')[3].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.grass_pollen_huis'', ''forecast'')[3].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
alignment: center
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
- type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Onkruid
secondary: '{{states(''sensor.weed_pollen_huis'')}} ppm'
icon: mdi:cannabis
icon_color: |-
{% if states('sensor.weed_pollen_huis') |
float(0) > 342 %}
brown
{% elif states('sensor.weed_pollen_huis')
| float(0) > 61 %}
red
{% elif states('sensor.weed_pollen_huis')
| float(0) > 30 %}
orange
{% elif states('sensor.weed_pollen_huis')
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
layout: vertical
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
fill_container: true
card_mod:
style: |
ha-card {
background: none;
box-shadow: 0px 0px;
}
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.weed_pollen_huis', 'forecast')[0].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:cannabis
icon_color: |-
{% if state_attr('sensor.weed_pollen_huis', 'forecast')[0].value |
float(0) > 342 %}
brown
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[0].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[0].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[0].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[0].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.weed_pollen_huis', 'forecast')[1].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:cannabis
icon_color: |-
{% if state_attr('sensor.weed_pollen_huis', 'forecast')[1].value |
float(0) > 342 %}
brown
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[1].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[1].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[1].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[1].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.weed_pollen_huis', 'forecast')[2].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:cannabis
icon_color: |-
{% if state_attr('sensor.weed_pollen_huis', 'forecast')[2].value |
float(0) > 342 %}
brown
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[2].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[2].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[2].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[2].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
alignment: center
- type: custom:mushroom-chips-card
chips:
- type: template
content: |-
{% set dict = {'Mon': 'Ma', 'Tue': 'Di', 'Wed': 'Wo', 'Thu': 'Do',
'Fri': 'Vr', 'Sat': 'Za', 'Sun': 'Zo'} %} {% set str =
state_attr('sensor.weed_pollen_huis', 'forecast')[3].date |
as_timestamp | timestamp_custom('%a') %} {{ dict[str]
}}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
icon: mdi:cannabis
icon_color: |-
{% if state_attr('sensor.weed_pollen_huis', 'forecast')[3].value |
float(0) > 342 %}
brown
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[3].value
| float(0) > 61 %}
red
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[3].value
| float(0) > 30 %}
orange
{% elif state_attr('sensor.weed_pollen_huis', 'forecast')[3].value
| float(0) < 29 %}
green
{% else %}
grey
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
- type: template
content: '{{ state_attr(''sensor.weed_pollen_huis'', ''forecast'')[3].value }}'
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
ha-card
{
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
--chip-icon-size: var(--chip-icon-size);
}
alignment: center
card_mod:
style: |
.chip-container {
--chip-spacing: -10px;
i made it with my team on my dutch discord group, so the credits also goes to them. like @dennidoubles and many more.
To get this working you can use the last post but add type: grid
at the top of the custom card.
Thanks a lot for this plugin and this awesome card!