Invalid config for 'template' expected a dictionary

Hi,

I’m trying to tidy up my templates to remove the old platform: style formatting in the yaml, but I seem to keep hitting an error like the below, which I can’t make sense of.

Invalid config for ‘template’ at templates/temperature_tomorrow.yaml, line 2: expected a dictionary

As far as I can tell from the docs my code is correct, but it’s not happy with me. Example template below, would appreciate a push in the right direction:

#"Temperature Forecast Tomorrow"
- 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[0].temperature }}"
        unit_of_measurement: °C

Thanks in advance for any help, sure I’m just doing something stupid!

Which include/merge method are you using?

Wrong indentation for “hours”.

BTW, was a keyword changed “platform → trigger” for template sensors too?