And here is rest of my conf.
Sensors from templates.yaml
#================================
#=== ePaper display sensors
#================================
#template:
# Bundle up all the data to send over to ePaper (ESPHome device).
- trigger:
platform: time_pattern
minutes: "/1"
sensor:
- name: ePaper Data
state: "OK"
attributes:
weather_condition_now: >
{% set cond_now = states('sensor.weather_hourly') %}
{% 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_condition_0: >
{% set cond0 = state_attr('sensor.weather_hourly', 'forecast')[0].condition %}
{% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %}
{% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %}
{% set cond0_time = as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[0].datetime) %}
{% if cond0_time < next_rising and next_rising < next_setting %}
{% if cond0 == 'sunny' %} night {% elif cond0 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond0 }} {% endif %}
{% else %}
{{ cond0 }}
{% endif %}
weather_temperature_0: >
{{ state_attr('sensor.weather_hourly', 'forecast')[0].temperature | round }}
weather_timestamp_0: >
{{ as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[0].datetime) | timestamp_custom('%H:%M') }}
weather_condition_1: >
{% set cond1 = state_attr('sensor.weather_hourly', 'forecast')[1].condition %}
{% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %}
{% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %}
{% set cond1_time = as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[1].datetime) %}
{% if cond1_time < next_rising and next_rising < next_setting %}
{% if cond1 == 'sunny' %} night {% elif cond1 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond1 }} {% endif %}
{% else %}
{{ cond1 }}
{% endif %}
weather_temperature_1: >
{{ state_attr('sensor.weather_hourly', 'forecast')[1].temperature | round }}
weather_timestamp_1: >
{{ as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[1].datetime) | timestamp_custom('%H:%M') }}
weather_condition_2: >
{% set cond2 = state_attr('sensor.weather_hourly', 'forecast')[2].condition %}
{% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %}
{% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %}
{% set cond2_time = as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[2].datetime) %}
{% if cond2_time < next_rising and next_rising < next_setting %}
{% if cond2 == 'sunny' %} night {% elif cond2 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond2 }} {% endif %}
{% else %}
{{ cond2 }}
{% endif %}
weather_temperature_2: >
{{ state_attr('sensor.weather_hourly', 'forecast')[2].temperature | round }}
weather_timestamp_2: >
{{ as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[2].datetime) | timestamp_custom('%H:%M') }}
weather_condition_3: >
{% set cond3 = state_attr('sensor.weather_hourly', 'forecast')[3].condition %}
{% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %}
{% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %}
{% set cond3_time = as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[3].datetime) %}
{% if cond3_time < next_rising and next_rising < next_setting %}
{% if cond3 == 'sunny' %} night {% elif cond3 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond3 }} {% endif %}
{% else %}
{{ cond3 }}
{% endif %}
weather_temperature_3: >
{{ state_attr('sensor.weather_hourly', 'forecast')[3].temperature | round }}
weather_timestamp_3: >
{{ as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[3].datetime) | timestamp_custom('%H:%M') }}
weather_condition_4: >
{% set cond4 = state_attr('sensor.weather_hourly', 'forecast')[4].condition %}
{% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %}
{% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %}
{% set cond4_time = as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[4].datetime) %}
{% if cond4_time < next_rising and next_rising < next_setting %}
{% if cond4 == 'sunny' %} night {% elif cond4 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond4 }} {% endif %}
{% else %}
{{ cond4 }}
{% endif %}
weather_temperature_4: >
{{ state_attr('sensor.weather_hourly', 'forecast')[4].temperature | round }}
weather_timestamp_4: >
{{ as_timestamp(state_attr('sensor.weather_hourly', 'forecast')[4].datetime) | timestamp_custom('%H:%M') }}
weather_temp_low: >
{%set lowof = state_attr('sensor.weather_hourly','forecast') | selectattr('datetime','search', now().timestamp() | timestamp_custom('%Y-%m-%d')) | map(attribute='temperature') | min %}{% if lowof is defined and lowof %}{{lowof}}{%endif%}
weather_temp_high: >
{%set highof = state_attr('sensor.weather_hourly','forecast') | selectattr('datetime','search', now().timestamp() | timestamp_custom('%Y-%m-%d')) | map(attribute='temperature') | max %}{% if highof is defined and highof %}{{highof}}{%endif%}
ulkolampotila: >
{{ states('sensor.sensor_2_2_temperature') }}
kosteus: >
{{ states('sensor.lumi_lumi_weather_humidity') }}
ilmanpaine: >
{{ states('sensor.lumi_lumi_weather_pressure') }}
tuuli: >
{{ states('sensor.saa_tuulen_nopeus') }}
tuuli_suunta: >
{{ states('sensor.saa_tuulen_suunta') }}
mh_lampotila: >
{{ states('sensor.makuuhuone_lampotila') }}
mh_kosteus: >
{{ states('sensor.makuuhuone_kosteus') }}
mh_valoisuus: >
{{ states('sensor.makuuhuone_valoisuus') }}
mh_pm25: >
{{ states('sensor.makuuhuone_pm25') }}
oh_lampotila: >
{{ states('sensor.sensor_4_temperature') }}
oh_kosteus: >
{{ states('sensor.sensor_4_humidity') }}
keittio_lampotila: >
{{ states('sensor.keittio_zb_motion_temperature') }}
keittio_valoisuus: >
{{ states('sensor.keittio_zb_motion_illuminance') }}
kph_lampotila: >
{{ states('sensor.sensor_3_temperature') }}
kph_kosteus: >
{{ states('sensor.sensor_3_humidity') }}
nordpool_current: >
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour])) }}
nordpool_min: >
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024', 'min')|float / 0.05) | round() * 0.05) }}
nordpool_avg: >
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024', 'average')|float / 0.05) | round() * 0.05) }}
nordpool_max: >
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024', 'max')|float / 0.05) | round() * 0.05) }}
nordpool_1h: >
{% if now().hour+1 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+1-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+1])) }}
{% endif %}
nordpool_2h: >
{% if now().hour+2 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+2-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+2])) }}
{% endif %}
nordpool_3h: >
{% if now().hour+3 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+3-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+3])) }}
{% endif %}
nordpool_4h: >
{% if now().hour+4 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+4-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+4])) }}
{% endif %}
nordpool_5h: >
{% if now().hour+5 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+5-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+5])) }}
{% endif %}
nordpool_6h: >
{% if now().hour+6 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+6-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+6])) }}
{% endif %}
nordpool_7h: >
{% if now().hour+7 >= 24 %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','tomorrow')[now().hour+7-24])) }}
{% else %}
{{ ((state_attr('sensor.nordpool_kwh_fi_eur_2_10_024','today')[now().hour+7])) }}
{% endif %}
nordpool_timestamp_1: >
{{ (now()|as_timestamp + (60*60))|timestamp_custom("%H:00", True) }}
nordpool_timestamp_2: >
{{ (now()|as_timestamp + (60*120))|timestamp_custom("%H:00", True) }}
nordpool_timestamp_3: >
{{ (now()|as_timestamp + (60*180))|timestamp_custom("%H:00", True) }}
nordpool_timestamp_4: >
{{ (now()|as_timestamp + (60*240))|timestamp_custom("%H:00", True) }}
nordpool_timestamp_5: >
{{ (now()|as_timestamp + (60*320))|timestamp_custom("%H:00", True) }}
nordpool_timestamp_6: >
{{ (now()|as_timestamp + (60*360))|timestamp_custom("%H:00", True) }}
nordpool_timestamp_7: >
{{ (now()|as_timestamp + (60*420))|timestamp_custom("%H:00", True) }}
total_hourly_energy: >
{{ states('sensor.total_hourly_energy') }}
total_daily_energy: >
{{ states('sensor.total_energy_daily') }}
nordpool_text: >
{% set min_price = 10 |
float %} {% set max_price = 20 | float %} {% set current_price =
state_attr('sensor.nordpool_kwh_fi_eur_2_10_024', 'current_price') | float %}
{% if current_price < min_price %}
Sähkö on nyt halpaa, hinta on {{ states('sensor.nordpool_kwh_fi_eur_2_10_024', 'current_price') }} c/kWh
{% elif current_price > min_price and current_price < max_price %}
Sähkö on nyt keskihintaista, hinta on {{ states('sensor.nordpool_kwh_fi_eur_2_10_024', 'current_price') }} c/kWh
{% elif current_price > max_price %}
Sähkö on nyt kallista, hinta on {{ states('sensor.nordpool_kwh_fi_eur_2_10_024', 'current_price') }} c/kWh
{% endif %}
I update the display via automation twice an hour. At the second minute of every hour and when the weather forecast is updated. The weather forecast is updated at a random time approximately every hour, which is why it is updated when the latest information is available. In addition, someone has to be at home and awake for the display to be updated.