Weather Card

The weather card is a dynamic card that changes based on conditions. There is a different color, image and icons for the different weather conditions.

Weather Card

Usage

Custom Sensor needed

Before you can use this card, you need to have a custom sensor that gets the forecast data. You can create a custom sensor inside your configuration.yaml or create a templates.yaml file in the root of Home Assistant and add template: !include templates.yaml to your configuration.yaml. Then, add this code underneath, save the file and reload your configuration.

- trigger:
    - platform: time_pattern
      hours: /1
    - platform: event
      event_type: event_template_reloaded
  action:
    - service: weather.get_forecasts
      target:
        entity_id:
          - weather.home
      data:
        type: daily
      response_variable: dailyforecast
  sensor:

    - name: Weather Entity Forecast
      unique_id: weather_entity_forecast
      state: ""
      icon: mdi:hours-24
      attributes:
        condition: ""
        cloud_coverage: ""
        temperature: ""
        wind_speed: ""
        wind_gust: ""
        dew_point:  ""
        wind_bearing:  ""

        datetime: ""
        forecast: ""

Now, you should have a new sensor called sensor.weather_entity_forecast which you can use as entity in this card.

Note: If you want to use another weather provider like Buienradar or Accuweather, just replace weather.home with your desired intergration.

View code

      - type: custom:button-card
        template: hc_weather_card
        entity: sensor.weather_entity_forecast

Variables

Variable Default Required Description
label_left returns date No text in left top corner
label_right   No text in right top corner
show_forecast true No shows or hides the forecast

Contribution


Copyright © 2024-2025 Damian Eickhoff. Distributed by an MIT license.