So I am stuck, and I must be stupid as hell…
I have built this summer an e-paper display for the weather forecast of the next 5 days. I had more than a hard time to get the Waveshare 4.2in 3-color display working on ESPhome, finally pulling in from someone else the patched ESPhome display code that won’t make it’s way into HA ESPhome.
Now I have this big chunk of template code to get the forecast data into my display. What should/must I do to keep my display working after 2024.xyz??
- trigger:
- platform: time_pattern
seconds: 0
minutes: /1
sensor:
- name: e-paper display data
unique_id: e_paper_display_data
icon: mdi:wallpaper
availability: "true"
state: "OK"
attributes:
weather_condition_now: >
{% set cond_now = states('weather.dwd_weather_buchholz') %}
{% if states('sun.sun') == 'below_horizon' %}
{% if cond_now == 'sunny' %} night {% elif cond_now == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond_now }} {% endif %}
{% else %}
{{ cond_now }}
{% endif %}
weather_temperature_now: >
{{ states('sensor.outdoor_environment_temperature') | round(1) }}
weather_templow_today: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[0].templow | round(0) }}
weather_temphigh_today: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[0].temperature | round(0) }}
weather_rain_today: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[0].precipitation | round(1) }}
weather_rain_prob_today: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[0].precipitation_probability | round(0) }}
weekday_today: >
{% set weekday_long = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] %}
{{ weekday_long[now().weekday()] }}
today_date: >
{{ now().date() }}
weather_condition_1: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[1].condition }}
weather_templow_1: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[1].templow | round(0) }}
weather_temphigh_1: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[1].temperature | round(0) }}
weather_rain_1: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[1].precipitation | round(1) }}
weather_rain_prob_1: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[1].precipitation_probability | round(0) }}
weather_day_1: >
{% set days = ['MO', 'DI', 'MI', 'DO', 'FR', 'SA', 'SO'] %}
{{ days[as_timestamp(state_attr('weather.dwd_weather_buchholz', 'forecast')[1].datetime) | timestamp_custom('%w') | int -1] }}
weather_condition_2: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[2].condition }}
weather_templow_2: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[2].templow | round(0) }}
weather_temphigh_2: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[2].temperature | round(0) }}
weather_rain_2: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[2].precipitation | round(1) }}
weather_rain_prob_2: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[2].precipitation_probability | round(0) }}
weather_day_2: >
{% set days = ['MO', 'DI', 'MI', 'DO', 'FR', 'SA', 'SO'] %}
{{ days[as_timestamp(state_attr('weather.dwd_weather_buchholz', 'forecast')[2].datetime) | timestamp_custom('%w') | int -1] }}
weather_condition_3: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[3].condition }}
weather_templow_3: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[3].templow | round(0) }}
weather_temphigh_3: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[3].temperature | round(0) }}
weather_rain_3: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[3].precipitation | round(1) }}
weather_rain_prob_3: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[3].precipitation_probability | round(0) }}
weather_day_3: >
{% set days = ['MO', 'DI', 'MI', 'DO', 'FR', 'SA', 'SO'] %}
{{ days[as_timestamp(state_attr('weather.dwd_weather_buchholz', 'forecast')[3].datetime) | timestamp_custom('%w') | int -1] }}
weather_condition_4: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[4].condition }}
weather_templow_4: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[4].templow | round(0) }}
weather_temphigh_4: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[4].temperature | round(0) }}
weather_rain_4: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[4].precipitation | round(1) }}
weather_rain_prob_4: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[4].precipitation_probability | round(0) }}
weather_day_4: >
{% set days = ['MO', 'DI', 'MI', 'DO', 'FR', 'SA', 'SO'] %}
{{ days[as_timestamp(state_attr('weather.dwd_weather_buchholz', 'forecast')[4].datetime) | timestamp_custom('%w') | int -1] }}
weather_condition_5: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[5].condition }}
weather_templow_5: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[5].templow | round(0) }}
weather_temphigh_5: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[5].temperature | round(0) }}
weather_rain_5: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[5].precipitation | round(1) }}
weather_rain_prob_5: >
{{ state_attr('weather.dwd_weather_buchholz', 'forecast')[5].precipitation_probability | round(0) }}
weather_day_5: >
{% set days = ['MO', 'DI', 'MI', 'DO', 'FR', 'SA', 'SO'] %}
{{ days[as_timestamp(state_attr('weather.dwd_weather_buchholz', 'forecast')[5].datetime) | timestamp_custom('%w') | int -1] }}
I am really annoyed (to not use another word) now about this decision