Home assistant - Dashboard for Date & Time + Times of the Day + Season + currently weather + weather forecast + weather card

add to configuration.yaml

sensor:
# Time & date
  - platform: time_date
    display_options:
      - "time"
      - "date"
      - "date_time"
      - "date_time_utc"
      - "date_time_iso"
      - "time_date"
      - "time_utc"
      - "beat"
  # Seasons
  - platform: season
    name: "Seasons"
  # Change the date display
  - platform: template
    sensors:
      date_long: 
        friendly_name: 'Date'
        value_template: >
          {% set months = ["January.", "February.", "March.", "April.", "May.", "June.", "July.", "August.", "September.", "October.", "November.", "December.""] %}
          {% set month = months[now().strftime('%m') | int -1] %}
          {% set days = ["Sunday, ", "Monday, ", "Tuesday, ", "Wednesday, ", "Thursday, ", "Friday, ", "Saturday, "]  %}
          {% set day = days[now().strftime('%w') | int] %}
          {{ day + ' ' + now().strftime('%d') + '.' + now().strftime('%m') + '.' + month + ' '+ now().strftime('%Y') }}
# Parts of the day - View the current part of the day
  - platform: template
    sensors:
      greeting:
        friendly_name: 'Part of the day'
        value_template: >
          {% set state = states('sensor.time') %}
          {% if '22:00' <= state < '06:00' %}
            Night
          {% elif '06:00' <= state < '08:00' %}
            Morning
          {% elif '08:00' <= state < '20:00' %}
            Day
          {% else %}
            Evening
          {% endif %} 

===================
add 1 cards

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: entity
        entity: sensor.time
        name: Time
      - type: entity
        entity: sensor.greeting
        state_color: true
        icon: mdi:timelapse
      - type: entity
        entity: sensor.seasons
  - type: horizontal-stack
    cards:
      - type: weather-forecast
        entity: weather.dom
        show_forecast: false
        name: Home
  - type: custom:weather-card
    entity: weather.dom
    number_of_forecasts: '5'
    name: Weather

===================
add 2 cards

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: entity
        entity: sensor.date_long
        icon: mdi:calendar-month
  - type: iframe
    url: >-
      https://embed.windy.com/embed2.html?lat=xx.xxxxxx&lon=xx.xxxxxx&detailLat=xx.xxxxxx&detailLon=xx.xxxxxx&width=650&height=450&zoom=9&level=surface&overlay=clouds&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=default&metricTemp=default&radarRange=-1 
    aspect_ratio: 95%
NOTE: your coordinates where is xx (lat=xx.xxxxxx&lon=xx.xxxxxx&detailLat=xx.xxxxxx&detailLon=xx.xxxxxx add )
1 Like

I had to change platform seasons to get this to check valid

# Seasons
- platform: season
  name: "Seasons"

Sorry, my mistake. The original is in Slovene and when I translated it I accidentally deleted " ". Thanks for the warning, I corrected it. But I don’t think there should be a problem because the name on the card overrides the default name. Anyway, thanks and regards from Slovenia.

Hi Robert.

I inserted the copied text into my “sensor.yaml”, but the following error occured:

Invalid config for [sensor.template]: invalid template (TemplateSyntaxError: expected token ‘,’, got ‘Sunday’) for dictionary value @ data[‘sensors’][‘date_long’][‘value_template’]. Got '{% set months = [“January.”, “February.”, “March.”, “April.”, “May.”, “June.”, “July.”, “August.”, “September.”, “October.”, “November.”, “December.”"] %} {% set month = months[now().strftime('%m') | int -1] %} {% set days = ["Sunday, ", "Monday, ", "Tuesday, ", "Wednesday, ", "Thursday, ", "Friday, ", "Saturday, "] %} {% set day = days[now().strftime('%w') | int] %} {{ day + ' ' + now().strftime('%d') + '.' + now().strftime('%m') + '.' + month + ' '+ now().strftime('%Y') … (See ?, line ?).

Any ideas what can be wrong?

Same here, same error

After December (in the list of months) there is a second redundant quotation mark (") that needs to be removed.

2 Likes

should be added to sensors.yaml or to configuration.yaml?

You are totally right Philip!
When I delete the extra quotation mark, everything worked!
Thank you for your help!

that did it, thanks Phillip

Has anyone discovered a way to make the map static? Using that on a mobile app makes it impossible to scroll.

Hi everyone, I just followed the instructions in the beginning of the post and got the following error

Anyone got a fix?

The Season YAML configuration has been removed
This stops working in version 2022.12.0. Please address before upgrading.
Configuring Season using YAML has been removed.

Your existing YAML configuration is not used by Home Assistant.

Remove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.

Hello cb24nz, spacegaier, lidans5, JohnPlou and Trzinka,
as a new HA user, I would like to display the date on the start page, as shown by Trzinka. Does anyone have a detailed description for me as a “greenhorn” on how to integrate this?
Does (add to Configuration.yaml) have to be inserted on line13 (see printscreen)?
Where does the script (add 1 cards) belong? Also the script add2 cards, in a new card (tile)?
Many thanks for your support!
Novell1