English | 正體中文
Thanks to Madelena for inspiring this project and providing the source code for weather data.
This project is a vertical E-ink weather forecast board placed at the entrance, automatically updating and displaying content at specified intervals.
There is also a horizontal version that can display temperature and humidity information for individual rooms on the E-ink: E-ink Dashboard
The vertical weather board displays:
- Today's date
- Current weather forecast
- Weather forecast for the next four hours
Below are the hardware structure, ESPHome yaml code, and Home assistant yaml code.
- Waveshare 7.5-inch black and white E-ink screen - bare screen without casing
- Waveshare E-ink screen SPI driver board ESP32 - WiFi + Bluetooth version (ESP32)
- IKEA RÖDALM Frame 13x18 cm - available in black, white, and wooden color. Note: The mat opening is small and needs to be enlarged
- Place the files in the
/fonts
folder ande-ink-weather-board.yaml
in the HA/config/esphome folder. - Place
eink_dashboard_sensor.yaml
in the HA/config/packages folder. - Place
background.png
from the/images
folder in the HA/config/esphome/images folder. - Modify
e-ink-weather-board.yaml
andeink_dashboard_sensor.yaml
to match your HA entity IDs. Instructions are below - Check for YAML code errors in HA.
- Developer Tools > YAML > Check Configuration, ensure no errors in the bottom left notification.
- YAML Configuration Reloading > Template Entities
- Developer Tools > States > Check
sensor.eink_sensors
to ensure it appears and contains the desired content.
- Flash e-ink-weather-board.yaml to the ESP32 module in ESPHome.
- Done!
button:
- platform: template
name: '${devicename} Refresh'
icon: 'mdi:update'
on_press:
then:
- component.update: 'my_display'
internal: false
time:
- platform: homeassistant
id: ha_time
Note: Long-term power to this panel may cause increasing blurriness. It is recommended to power the ESP32 only when refreshing or enter Deep Sleep to avoid this issue.
The default screen does not automatically update update_interval: never
. It is updated by HA automation based on the desired interval.
Automation process:
trigger:
- platform: time_pattern
# /2 means every 2 hours, use /1 for every hour
hours: "/2"
# 1 means it runs at the 1st minute of the hour, like 06:01, 08:01, 10:01
minutes: 1
Set the update period in HA > Settings > Devices & Services > Helpers > Add Helper > "Daily Timer" > Set the desired update period, name it eink_refresh_time
.
condition:
#Update only during allowed periods
- condition: state
entity_id: binary_sensor.eink_refresh_time
state: 'on'
action:
#Press the update button, replace with your entity ID
- service: button.press
data:
entity_id: button.eink_weather_board_screen_refresh
Remember to check the configuration in Developer Tools > YAML > Check Configuration.
Once everything is correct, reload the automation in YAML Configuration Reloading > Automation.
Ensure the following code is written inconfiguration.yaml
for eink_dashboard_sensor_new.yaml
to take effect
Ensure the weather integration supports hourly forecasts (built-in met.no does).
The following YAML calls the "hourly" weather forecast service at 1 minute past every hour and updates sensor.eink_sensors with the content.
Update the panel after updating the weather forecast to avoid seeing the previous hour's forecast.
- trigger:
- platform: time_pattern
hours: "/1"
minutes: 1
action:
- service: weather.get_forecasts
target:
entity_id: weather.myhome #replace with your weather forecast entity id
data:
type: hourly
response_variable: hourly
Use the first set of the weather forecast as this hour's forecast and display the 2nd to 5th sets for the next four hours.
attributes
separates the information from the weather forecast as:
- Temperature for this hour:
today_temperature
- Humidity for this hour:
today_humidity
- Precipitation probability for this hour:
today_precipitation
- Time for the next four hours:
forecast_weekday_1
,forecast_weekday_2
,forecast_weekday_3
,forecast_weekday_4
- Weather icons for the next four hours:
forecast_condition_1
,forecast_condition_2
,forecast_condition_3
,forecast_condition_4
- Temperature for the next four hours:
forecast_temperature_1
,forecast_temperature_2
,forecast_temperature_3
,forecast_temperature_4