Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: markdown
- content: >
- <table>
- <tr><th width=35px></th><th align=left width=150px>Tidspunkt</th><th
- align=right width=75px>Temperatur</th><th align=right
- width=75px>Nedbør</th><th align=right width=75px>Vind</th></tr>
- {% for w in state_attr('weather.home_hourly','forecast') -%}
- {% set h=w.datetime | as_datetime | as_local %}
- {% if ((h.hour/2) | int) == (h.hour/2) %}
- {% if h.day==now().day %} {% set d='I dag' %} {% else %} {% set d='I morgen'
- %} {% endif %}
- <tr><td><ha-icon icon='mdi:weather-{{w.condition | replace('partly','partly-')
- | replace('clear','') | replace('lightning','lightning-') |
- replace('snowyrainy','snowy-rainy')-}}'/></ha-icon></td>
- <td>{{ d }} {{ w.datetime | as_timestamp | timestamp_custom('%H.00',
- local=True) -}}</td>
- <td align=right>{{ w.temperature }} °C</td>
- <td align=right>{{ w.precipitation | int }} mm</td>
- <td align=right>{{ w.wind_speed | int }} m/s</td></tr>
- {% endif %}
- {% endfor -%}
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement