I have this template that were working perfectly before upgrading to 0.85.1
- service: tts.google_say
data_template:
entity_id: media_player.googlehome0461
message: >-
{% if now().strftime("%H")|int < 12 %}
Buongiorno.
{% elif now().strftime("%H")|int < 18 %}
Buon Pomeriggio.
{% else %}
Buonasera.
{% endif %}
Meteo ed Agenda.
Oggi il sole è sorto alle ore {{states.sensor.sunrisetoday.state}} e tramonterà alle ore {{states.sensor.sunsettoday.state}}.
Il tempo è {{states.sensor.dark_sky_summary.state}} con {{states.sensor.dark_sky_temperature.state|round}} gradi.
Oggi sarà {{states.sensor.dark_sky_hourly_summary.state|replace(".", "")}},
temperatura massima: {{states.sensor.dark_sky_daytime_high_temperature_0.state|round}} gradi,
temperatura minima: {{states.sensor.dark_sky_overnight_low_temperature_0.state|round}} gradi.
Venti da {{states.sensor.pws_wind_dir_2.state
|replace("N","Nord ")
|replace("S","Sud ")
|replace("E","Est ")
|replace("O","Ovest ")
}} a {{states.sensor.pws_wind_1d_kph_2.state}} km/h con raffiche fino a {{states.sensor.pws_wind_gust_kph.state|round}} km/h.
Probabilità di pioggia: {{states.sensor.pws_precip_1d_2.state | int(0)}}%.
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.xxxigmailcom.attributes.start_time).split(" ")[0] and states.calendar.xxxgmailcom.attributes.all_day != True %} Prossimo appuntamento in Agenda: {{states.calendar.xxxgmailcom.attributes.message}} at {{(states.calendar.xxxgmailcom.attributes.start_time).split(" ")[1].split(":")[0]}} {%if (states.calendar.xxxgmailcom.attributes.start_time).split(" ")[1].split(":")[1] != '00'%}{{(states.calendar.xxxgmailcom.attributes.start_time).split(" ")[1].split(":")[1]}} {%endif%} {%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.xxxgmailcom.attributes.start_time).split(" ")[0] and states.calendar.xxxgmailcom.attributes.all_day == True %} Oggi è: {{states.calendar.xxxgmailcom.attributes.message|replace("/","and")}}{%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.inter_calendar.attributes.start_time).split(" ")[0] and states.calendar.inter_calendar.attributes.all_day != True %} Prossimo appuntamento in agenda: {{states.calendar.inter_calendar.attributes.message}} alle {{(states.calendar.inter_calendar.attributes.start_time).split(" ")[1].split(":")[0]}} {%if (states.calendar.inter_calendar.attributes.start_time).split(" ")[1].split(":")[1] != '00'%}{{(states.calendar.inter_calendar.attributes.start_time).split(" ")[1].split(":")[1]}} {%endif%} {%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.inter_calendar.attributes.start_time).split(" ")[0] and states.calendar.inter_calendar.attributes.all_day == True %} Oggi è: {{states.calendar.inter_calendar.attributes.message|replace("/","and")}}{%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.contacts.attributes.start_time).split(" ")[0] and states.calendar.contacts.attributes.all_day != True %} Prossimo appuntamento in agenda: {{states.calendar.contacts.attributes.message}} alle {{(states.calendar.contacts.attributes.start_time).split(" ")[1].split(":")[0]}} {%if (states.calendar.contacts.attributes.start_time).split(" ")[1].split(":")[1] != '00'%}{{(states.calendar.contacts.start_time).split(" ")[1].split(":")[1]}} {%endif%} {%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.contacts.attributes.start_time).split(" ")[0] and states.calendar.contacts.attributes.all_day == True %} Oggi è: {{states.calendar.contacts.attributes.message|replace("/","and")}}{%endif%}
Tempo di percorrenza per Roma {{ states.sensor.avezzanoroma.attributes.duration | int | round(0) }} Minuti
But now if i test it in template editor i get this error:
Error rendering template: UndefinedError: 'None' has no attribute 'attributes'
What is changed in 0.85.1 ? How to fix?
EDIT: Solved !
The change was in the name of the sensor.avezzanoroma that is changed into sensor.avezzano_roma. I think it’s a breaking change butb i did not read anything about it in the changelog of 0.85.1.