Removed deprecated forecast attribute from WeatherEntity

Hi, until now i was stuck for a while on core version 2023.12.4 and i had forecast weather sensor

- sensor:
    - name: "forecast_thermometer_temperature"
      unit_of_measurement: "°C"
      state: "{{state_attr('weather.tomorrow_io_home_daily','forecast')[0]['temperature']|round(1)}}"

How should i change it to make it work again. I see there is some service call needed, but can i still somehow use sensor template, or it must be approached in a completely different way?

Do i get it correctly that i can replace in templates.yaml

- sensor:
    - name: "forecast_thermometer_temperature"
      unit_of_measurement: "°C"
      state: "{{state_attr('weather.tomorrow_io_home_daily','forecast')[0]['temperature']|round(1)}}"

with something like that:

- trigger:
    - platform: time_pattern
      minutes: "0"
  action:
    - service: weather.get_forecasts
      target:
        entity_id: weather.tomorrow_io_home_daily
      data:
        type: daily
      response_variable: daily
  sensor:
    - name: Forecast temperature
      unit_of_measurement: "°C"
      state: >
        {{ daily['weather.home'].forecast[0].temperature }}

or i should to remove my old entry from templates.yaml and add this new one in some other way?

I have added in templates.yaml following sensor, and it works:

- trigger:
    - platform: time_pattern
      minutes: "0"
  action:
    - service: weather.get_forecasts
      target:
        entity_id: weather.tomorrow_io_home_daily
      data:
        type: daily
      response_variable: daily
  sensor:
    - name: Forecast temperature
      unit_of_measurement: "°C"
      state: >
        {{ daily['weather.tomorrow_io_home_daily'].forecast[0].temperature }}
    - name: Precipitation probability
      unit_of_measurement: "°C"
      state: >
        {{ daily['weather.tomorrow_io_home_daily'].forecast[0].precipitation_probability }}