Weather forecast display on LVGL

I am building a display for the local weather and I had no problem displaying the information for todays weather. But I can’t figure out how to display a weather forecast for the next three days. It looks like recently a special object was added for this but I can’t access it.

This project seem to be able to do it but this code doesn’t work for me.

It says to use this code to create the forecast object. But I get errors when I put this in my configuration.yaml

- trigger:
    - platform: time_pattern
      minutes: /1
  action:
    - service: weather.get_forecasts
      data:
        type: daily
      target:
        entity_id: weather.casa
      response_variable: previsioni
  sensor:
    - name: Previsioni
      unique_id: weather_forecast
      state: "{{ now().isoformat() }}"
      attributes:
        forecast: "{{ previsioni['weather.casa']['forecast'] }}"

Is there a simple way to get a weather forecast on ESPHome. Or good directions for a complex way?

This topic has an example on how to get weather data to an e-ink display. That will work equally well on other displays: