Weather card with tomorrow's weather

Hi,
Goal: to display some weather forecast card with hourly (deluxe: every other hour) forecasts of the next day’s weather, starting at a specific time (e.g. 07:00). So no matter at what time in the evening I look at that card, it always shows the weather starting at 07:00.

use Case: Sonoff panel that will display this card in the evening so we can see what the weather will be during the next day. So we know which clothes to prepare for the kids

I’ve tried many HACS cards, I cannot specify a ‘starting time’. I can imagine, that I could slurp the forecast into some data structure and then instruct a custom card to look at that data. Frankly, I was not able to figure that out.

Did anyone have a similar idea and find a simple solution?

thanks
simon

ps: I hope Frontend is the right category. otherwise feel free to move

I don’t know if I can be of any help, but I needed something similar and stumbled upon your question. And I think you can achieve what you need based on my solution.

What I wanted is to display tomorrow’s temperature and condition on my Sonoff panel. So, I created new template in configuration.yaml:

template:
  - trigger:
      - trigger: time_pattern
        hours: /1
    action:
      - action: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.forecast_home
        response_variable: daily
    sensor:
      - name: Temperature forecast tomorrow
        unique_id: temperature_forecast_tomorrow
        state: "{{ daily['weather.forecast_home'].forecast[1].temperature }}"
        device_class: temperature
        unit_of_measurement: °C
      - name: Condition forecast tomorrow
        unique_id: condition_forecast_tomorrow
        state: "{{ daily['weather.forecast_home'].forecast[1].condition }}"

This gives me the data, and then I show it on panel’s screen (only part of the dashboard show here):

      - type: vertical-stack
        cards:
          - show_name: false
            show_icon: false
            show_state: true
            type: glance
            entities:
              - entity: sensor.temperature_forecast_tomorrow
            state_color: false
            card_mod:
              style: |
                ha-card {
                  /* border: 2px solid gold !important; */
                  font-size: 30px !important;
                }
                ha-card .entity {
                  line-height: 35px;
                  font-size: 30px;
                  color: lightyellow;
                }
          - type: custom:button-card
            entity: sensor.condition_forecast_tomorrow
            show_state: false
            show_name: false
            show_icon: true
            icon: |
              [[[
                if (entity.state == "clear-day")
                  return "mdi:weather-sunny";
                else if (entity.state == "sunny")
                  return "mdi:weather-sunny";
                else if (entity.state == "clear")
                  return "mdi:weather-sunny";
                else if (entity.state == "clear-night")
                  return "mdi:weather-night";
                else if (entity.state == "rainy")
                  return "mdi:weather-rainy";
                else if (entity.state == "pouring")
                  return "mdi:weather-pouring";
                else if (entity.state == "snow")
                  return "mdi:weather-snowy";
                else if (entity.state == "fog")
                  return "mdi:weather-fog";
                else if (entity.state == "sleet")
                  return "mdi:weather-partly-snowy-rainy";
                else if (entity.state == "wind")
                  return "mdi:weather-windy";
                else if (entity.state == "cloudy")
                  return "mdi:weather-cloudy";
                else if (entity.state == "partlycloudy")
                  return "mdi:weather-partly-cloudy";
                else if (entity.state == "partly-cloudy-night")
                  return "mdi:weather-night-partly-cloudy";
                else if (entity.state == "hail")
                  return "mdi:weather-hail";
                else if (entity.state == "lightning")
                  return "mdi:weather-lightning";
                else if (entity.state == "tstorm")
                  return "mdi:weather-lightning-rainy";
                else
                  return "mdi:cloud-question-outline";
              ]]]

I think you can achieve what you need if you pass the list to the template, and not just tomorrow’s data like I did (forecast[1]). In any case, sorry if this is noise and I hope to be helpful.