#Daily Forecast Template

1 messages · Page 1 of 1 (latest)

grand heron
#

`value_template:

  • platform: template
    sensors:
    daily_forecast:
    friendly_name: Daily Forecast
    state: >
    {{ states('weather.thermoking')[0].attributes.forecast[0].temperature }}°{{ states('weather.thermoking')[0].attributes.forecast[0].unit }}
    attributes:
    condition: "{{ states('weather.thermoking')[0].attributes.forecast[1].condition }}"
    precipitation_probability: "{{ states('weather.thermoking')[0].attributes.forecast[0].precipitation }}"
    wind_speed: "{{ states('weather.thermoking')[0].attributes.forecast[1].wind_speed }}"
    humidity: "{{ states('weather.thermoking')[0].attributes.forecast[1].humidity }}"
    description: "{{ states('weather.thermoking')[0].attributes.forecast[1].condition }}"`
#

Not sure what I mixed up @restive saddle

restive saddle
#

I said that you should replace 'state' not 'sensor'

#

That's what it was complaining about

#

You are mixing up the new and legacy template sensor formats

grand heron
#

is there a simpler template to get the daily forecast in a sensor? The reason i'm trying to make this template is form my daily agenda automation to give me a daily morning summary. My trace error is:` Stopped because an error was encountered at August 21, 2024 at 7:44:19 AM (runtime: 0.04 seconds)

UndefinedError: 'daily_forecast' is undefined`