Advertisement
krissen

Pollenrapport (text)

May 16th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.20 KB | None | 0 0
  1. {# Låga halter #}  
  2. {%- for entity_id in states.group.pollen.attributes.entity_id if states(entity_id) == 'låga halter' or states(entity_id) == 'låga-måttliga halter' -%}
  3.   {% set parts = entity_id.split('.') -%}
  4.   {%- if loop.first %}Låga halter av {% elif loop.last %} och {% else %}, {% endif -%}{{ states[parts[0]][parts[1]].name | lower }}
  5.   {%- if loop.last %}.{%- endif %}
  6. {%- endfor %}
  7.  
  8. {# Måttliga halter #}  
  9. {%- for entity_id in states.group.pollen.attributes.entity_id if states(entity_id) == 'måttliga halter' or states(entity_id) == 'måttliga-höga halter' -%}
  10.   {% set parts = entity_id.split('.') -%}
  11.   {%- if loop.first %}Måttliga halter av {% elif loop.last %} och {% else %}, {% endif -%}{{ states[parts[0]][parts[1]].name | lower }}
  12.   {%- if loop.last %}.{%- endif %}
  13. {%- endfor %}
  14.  
  15. {# Höga halter #}  
  16. {%- for entity_id in states.group.pollen.attributes.entity_id if states(entity_id) == 'höga halter' or states(entity_id) == ' mycket höga halter' -%}
  17.   {% set parts = entity_id.split('.') -%}
  18.   {%- if loop.first %}Höga halter av {% elif loop.last %} och {% else %}, {% endif -%}{{ states[parts[0]][parts[1]].name | lower }}
  19.   {%- if loop.last %}.{%- endif %}
  20. {%- endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement