This is my weather station.
@psp888
thanks for your inspiration
WeAct E-Ink 2.9" displays were used. Unfortunately, they are not yet supported in ESPHome. But they can be downloaded here as a beta.
In addition, a Zigbee repeater was installed to extend the distance of my sensors
the 3D data can be loaded onto thingiverse.
font:
- file: 'fonts/Roboto-Medium.ttf'
id: size_85_font
size: 85
- file: 'fonts/Roboto-Medium.ttf'
id: size_75_font
size: 75
- file: 'fonts/Roboto-Medium.ttf'
id: size_60_font
size: 60
- file: 'fonts/Roboto-Medium.ttf'
id: size_50_font
size: 50
- file: 'fonts/Roboto-Light.ttf'
id: size_12_font
size: 12
- file: 'fonts/Roboto-Medium.ttf'
id: size_15_font
size: 15
- file: 'fonts/Roboto-Medium.ttf'
id: size_14_font
size: 14
- file: 'fonts/Roboto-Medium.ttf'
id: size_20_font
glyphs:
['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
'1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/']
size: 20
- file: 'fonts/Roboto-Medium.ttf'
id: size_25_font
size: 25
- file: 'fonts/Roboto-Medium.ttf'
id: size_30_font
size: 30
- file: 'fonts/materialdesignicons-webfont.ttf'
id: weather_font
size: 120
glyphs: [
# Weather
"\U000F0599", # mdi-weather-sunny
"\U000F0590", # mdi-weather-cloudy
"\U000F0596", # mdi-weather-pouring
"\U000F067F", # mdi-weather-snowy-rainy
"\U000F0F36", # mdi-weather-snowy-heavy
"\U000F059E", # mdi-weather-windy-variant
"\U000F0591", # mdi-weather-fog
"\U000F0F31", # mdi-weather-night-partly-cloudy
"\U000F0595", # mdi-weather-partly-cloudy
"\U000F0597", # mdi-weather-rainy
"\U000F0598", # mdi-weather-snowy
"\U000F0594", # mdi-weather-clear-night
"\U000F199F", # unknown
]
- file: 'fonts/materialdesignicons-webfont.ttf'
id: weather_font_smal
size: 35
glyphs: [
# Weather
"\U000F0599", # mdi-weather-sunny
"\U000F0590", # mdi-weather-cloudy
"\U000F0596", # mdi-weather-pouring
"\U000F067F", # mdi-weather-snowy-rainy
"\U000F0F36", # mdi-weather-snowy-heavy
"\U000F059E", # mdi-weather-windy-variant
"\U000F0591", # mdi-weather-fog
"\U000F0F31", # mdi-weather-night-partly-cloudy
"\U000F0595", # mdi-weather-partly-cloudy
"\U000F0597", # mdi-weather-rainy
"\U000F0598", # mdi-weather-snowy
"\U000F0594", # mdi-weather-clear-night
"\U000F199F", # unknown
]
- file: 'fonts/materialdesignicons-webfont.ttf'
id: weather_temp_icon_font
size: 25
glyphs: [
"\U000F0E03", # mdi-down
"\U000F0E02", # mdi-up
"\U000F058C", # raindrop
"\U000F059D", # wind
]
- file: 'fonts/materialdesignicons-webfont.ttf'
id: home_icon_font
size: 30
glyphs: [
"\U000F0F48", # mdi-chair-rolling
"\U000F02E3", # mdi-bed
"\U000F04B9", # mdi-sofa
"\U000F065A", # mdi-pot-steam
"\U000F09A0", # mdi-shower
"\U000F09A1", # mdi-shower-head
]
- file: 'fonts/materialdesignicons-webfont.ttf'
id: weather_font_45
size: 45
glyphs: [
# Moon
"\U000F0F64", # new_moon
"\U000F0F67", # waxing_crescent
"\U000F0F61", # first_quarter
"\U000F0F68", # waxing_gibbous
"\U000F0F62", # full_moon
"\U000F0F66", # waning_gibbous
"\U000F0F63", # last_quarter
"\U000F0F65", # waning_crescent
"\U000F199F", # mdi-timer-sand-complete
]
- file: 'fonts/materialdesignicons-webfont.ttf'
id: sun_icon_font
size: 20
glyphs: [
"\U000F059C", # sun rise
"\U000F059B", # sun set
]
- file: 'fonts/materialdesignicons-webfont.ttf'
id: wlan_icon_font
size: 25
glyphs: [
"\U000F0920", # wifi-strength-1-alert
"\U000F0922", # wifi-strenght-2
"\U000F0925", # wifi-strenght-3
"\U000F0928", # wifi-strenght-4
"\U000F092E", # wifi-strength-off-outline
]
spi:
- id: bus_a
clk_pin: GPIO18 #SCL grün
mosi_pin: GPIO23 #SDA gelb
- id: bus_b
clk_pin: GPIO17 #SCL grün
mosi_pin: GPIO15 #SDA gelb
display:
#Weater
- platform: waveshare_epaper
id: display_wetter
model: 2.90inBS
spi_id: bus_b
cs_pin: GPIO32 #CS blau
busy_pin: GPIO27 #BUSY schwarz
reset_pin: GPIO12 #RESET rot
dc_pin: GPIO16 #DC weiss
rotation: 90
full_update_every: 12
update_interval: 300s
lambda: |-
int x, y;
if (id(forecast_condition).has_state()) {
x = 56, y = 100;
if (id(forecast_condition).state == "snowy-rainy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(forecast_condition).state == "snowy-heavy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(forecast_condition).state == "rainy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0597");
} else if (id(forecast_condition).state == "pouring") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0596");
} else if (id(forecast_condition).state == "cloudy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0590");
} else if (id(forecast_condition).state == "partlycloudy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(forecast_condition).state == "sunny") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0599");
} else if (id(forecast_condition).state == "windyvariant") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F059E");
} else if (id(forecast_condition).state == "fog") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0591");
} else if (id(forecast_condition).state == "nightpartlycloudy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0F31");
} else if (id(forecast_condition).state == "partlycloudy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(forecast_condition).state == "snowy") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0598");
} else if (id(forecast_condition).state == "clear-night") {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F0594");
} else {
it.printf(x, y, id(weather_font), TextAlign::BASELINE_CENTER , "\U000F199F");
}
}
if (id(forecast_condition).has_state()) {
x = 56, y = 125;
if (id(forecast_condition).state == "snowy-rainy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Schneeregen");
} else if (id(forecast_condition).state == "snowy-heavy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "viel Schnee");
} else if (id(forecast_condition).state == "rainy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Regen");
} else if (id(forecast_condition).state == "pouring") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Strömend");
} else if (id(forecast_condition).state == "cloudy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Bewölkt");
} else if (id(forecast_condition).state == "partlycloudy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Durchzogen");
} else if (id(forecast_condition).state == "sunny") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Sonnig");
} else if (id(forecast_condition).state == "windyvariant") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Windig");
} else if (id(forecast_condition).state == "fog") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Nebel");
} else if (id(forecast_condition).state == "nightpartlycloudy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Durchzogen");
} else if (id(forecast_condition).state == "partlycloudy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Durchzogen");
} else if (id(forecast_condition).state == "snowy") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "Schnee");
} else if (id(forecast_condition).state == "clear-night") {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "klare Nacht");
} else {
it.print(x, y, id(size_20_font), TextAlign::BASELINE_CENTER , "keine Ahnung");
}
}
//Timne
//it.strftime(0, 90, id(size_12_font), "%H:%M", id(sntp_time).now());
it.printf(128, 26, id(weather_temp_icon_font), TextAlign::BASELINE_CENTER , "\U000F0E03");
if (id(MaxTemp12h).has_state()) {
it.printf(202, 24, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(MaxTemp12h).state);
it.printf(203, 18, id(size_20_font), TextAlign::BASELINE_LEFT , "°");
it.printf(204, 24, id(size_20_font), TextAlign::BASELINE_LEFT , "C");
}
it.printf(128, 57, id(weather_temp_icon_font), TextAlign::BASELINE_CENTER , "\U000F0E02");
if (id(MinTemp12h).has_state()) {
it.printf(202, 55, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(MinTemp12h).state);
it.printf(203, 49, id(size_20_font), TextAlign::BASELINE_LEFT , "°");
it.printf(204, 55, id(size_20_font), TextAlign::BASELINE_LEFT , "C");
}
std::string str = id(forecast_precipitation).state;
//ESP_LOGI("Weather", "%s", str.c_str());
it.printf(123, 88, id(weather_temp_icon_font), TextAlign::BASELINE_CENTER , "\U000F058C");
if (id(forecast_precipitation).has_state()) {
if (str != "unknown") {
it.printf(202, 86, id(size_30_font), TextAlign::BASELINE_RIGHT , "%s", id(forecast_precipitation).state.c_str());
it.printf(203, 86, id(size_12_font), TextAlign::BASELINE_LEFT , "mm");
}
else {
it.printf(202, 86, id(size_30_font), TextAlign::BASELINE_RIGHT , "0.0");
it.printf(203, 86, id(size_12_font), TextAlign::BASELINE_LEFT , "mm");
}
}
it.printf(123, 119, id(weather_temp_icon_font), TextAlign::BASELINE_CENTER , "\U000F059D");
if (id(forecast_wind_speed).has_state()) {
it.printf(202, 121, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(forecast_wind_speed).state * 2.237);
it.printf(203, 121, id(size_12_font), TextAlign::BASELINE_LEFT , "km/h");
}
//line
it.line(242, 0, 242, 128);
if (id(wettervorhesage3h).has_state()) {
x = 270, y = 30;
if (id(wettervorhesage3h).state == "snowy-rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage3h).state == "snowy-heavy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage3h).state == "rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0597");
} else if (id(wettervorhesage3h).state == "pouring") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0596");
} else if (id(wettervorhesage3h).state == "cloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0590");
} else if (id(wettervorhesage3h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage3h).state == "sunny") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0599");
} else if (id(wettervorhesage3h).state == "windyvariant") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F059E");
} else if (id(wettervorhesage3h).state == "fog") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0591");
} else if (id(wettervorhesage3h).state == "nightpartlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0F31");
} else if (id(wettervorhesage3h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage3h).state == "snowy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0598");
} else if (id(wettervorhesage3h).state == "clear-night") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0594");
} else {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F199F");
}
}
if (id(wettervorhesage6h).has_state()) {
x = 270, y = 62;
if (id(wettervorhesage6h).state == "snowy-rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage6h).state == "snowy-heavy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage6h).state == "rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0597");
} else if (id(wettervorhesage6h).state == "pouring") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0596");
} else if (id(wettervorhesage6h).state == "cloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0590");
} else if (id(wettervorhesage6h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage6h).state == "sunny") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0599");
} else if (id(wettervorhesage6h).state == "windyvariant") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F059E");
} else if (id(wettervorhesage6h).state == "fog") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0591");
} else if (id(wettervorhesage6h).state == "nightpartlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0F31");
} else if (id(wettervorhesage6h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage6h).state == "snowy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0598");
} else if (id(wettervorhesage6h).state == "clear-night") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0594");
} else {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F199F");
}
}
if (id(wettervorhesage9h).has_state()) {
x = 270, y = 94;
if (id(wettervorhesage9h).state == "snowy-rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage9h).state == "snowy-heavy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage9h).state == "rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0597");
} else if (id(wettervorhesage9h).state == "pouring") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0596");
} else if (id(wettervorhesage9h).state == "cloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0590");
} else if (id(wettervorhesage9h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage9h).state == "sunny") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0599");
} else if (id(wettervorhesage9h).state == "windyvariant") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F059E");
} else if (id(wettervorhesage9h).state == "fog") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0591");
} else if (id(wettervorhesage9h).state == "nightpartlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0F31");
} else if (id(wettervorhesage9h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage9h).state == "snowy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0598");
} else if (id(wettervorhesage9h).state == "clear-night") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0594");
} else {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F199F");
}
}
if (id(wettervorhesage12h).has_state()) {
x = 270, y = 126;
if (id(wettervorhesage12h).state == "snowy-rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage12h).state == "snowy-heavy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F067F");
} else if (id(wettervorhesage12h).state == "rainy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0597");
} else if (id(wettervorhesage12h).state == "pouring") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0596");
} else if (id(wettervorhesage12h).state == "cloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0590");
} else if (id(wettervorhesage12h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage12h).state == "sunny") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0599");
} else if (id(wettervorhesage12h).state == "windyvariant") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F059E");
} else if (id(wettervorhesage12h).state == "fog") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0591");
} else if (id(wettervorhesage12h).state == "nightpartlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0F31");
} else if (id(wettervorhesage12h).state == "partlycloudy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0595");
} else if (id(wettervorhesage12h).state == "snowy") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0598");
} else if (id(wettervorhesage12h).state == "clear-night") {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F0594");
} else {
it.printf(x, y, id(weather_font_smal), TextAlign::BASELINE_CENTER , "\U000F199F");
}
}
#In_Out
- platform: waveshare_epaper
model: 2.90inBS
spi_id: bus_a
cs_pin: GPIO25 #CS blau
busy_pin: GPIO1 #BUSY schwarz
reset_pin: GPIO2 #RESET rot
dc_pin: GPIO4 #DC weiss
rotation: 90
full_update_every: 12
update_interval: 300s
lambda: |-
it.print(0, 20, id(size_20_font), TextAlign::BASELINE_LEFT , "OUT");
it.printf(190, 60, id(size_75_font), TextAlign::BASELINE_RIGHT , "%.1f", id(outside_temp).state);
it.printf(190, 45, id(size_30_font), TextAlign::BASELINE_LEFT , "°");
it.printf(191, 60, id(size_30_font), TextAlign::BASELINE_LEFT , "C");
it.printf(280, 60, id(size_50_font), TextAlign::BASELINE_RIGHT , "%.0f", id(outside_humidity).state);
it.printf(296, 60, id(size_20_font), TextAlign::BASELINE_RIGHT , "%%");
//line
it.line(0, 70, 296, 70);
//it.print(0, 95, id(size_20_font), TextAlign::BASELINE_LEFT , "IN");
//it.printf(190, 125, id(size_60_font), TextAlign::BASELINE_RIGHT , "%.1f", id(inside_temp).state);
//it.printf(190, 110, id(size_30_font), TextAlign::BASELINE_LEFT , "°");
//it.printf(191, 125, id(size_30_font), TextAlign::BASELINE_LEFT , "C");
//it.printf(280, 125, id(size_50_font), TextAlign::BASELINE_RIGHT , "%.0f", id(inside_humidity).state);
//it.printf(296, 125, id(size_20_font), TextAlign::BASELINE_RIGHT , "%%");
//Time
//it.strftime(0, 40, id(size_12_font), "%H:%M", id(sntp_time).now());
//Wohnzimmer
it.printf(0, 101, id(home_icon_font), TextAlign::BASELINE_LEFT , "\U000F04B9");
it.printf(95, 100, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(living_room).state);
//Büro
it.printf(0, 128, id(home_icon_font), TextAlign::BASELINE_LEFT , "\U000F0F48");
it.printf(95, 127, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(office).state);
//Küche
it.printf(102, 101, id(home_icon_font), TextAlign::BASELINE_LEFT , "\U000F065A");
it.printf(197, 100, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(kitchen).state);
//Schlafzimmer
it.printf(102, 128, id(home_icon_font), TextAlign::BASELINE_LEFT , "\U000F02E3");
it.printf(197, 127, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(bedroom).state);
//Bad
it.printf(204, 101, id(home_icon_font), TextAlign::BASELINE_LEFT , "\U000F09A0");
it.printf(296, 100, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(bath).state);
//Dusche
it.printf(204, 128, id(home_icon_font), TextAlign::BASELINE_LEFT , "\U000F09A1");
it.printf(296, 127, id(size_30_font), TextAlign::BASELINE_RIGHT , "%.1f", id(shower).state);
#Date_Time
- platform: waveshare_epaper
model: 2.90inBS
spi_id: bus_a
cs_pin: GPIO21 #CS blau
busy_pin: GPIO1 #BUSY schwarz
reset_pin: GPIO2 #RESET rot
dc_pin: GPIO4 #DC weiss
rotation: 90
full_update_every: 60
update_interval: 60s
lambda: |-
/* Moon icon */
int x, y;
if (id(moon_icon).has_state()) {
x = 25, y = 42;
if (id(moon_icon).state == "new_moon") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F64");
} else if (id(moon_icon).state == "waxing_crescent") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F67");
} else if (id(moon_icon).state == "first_quarter") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F61");
} else if (id(moon_icon).state == "waxing_gibbous") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F68");
} else if (id(moon_icon).state == "full_moon") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F62");
} else if (id(moon_icon).state == "waning_gibbous") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F66");
} else if (id(moon_icon).state == "last_quarter") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F63");
} else if (id(moon_icon).state == "waning_crescent") {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F0F65");
} else {
it.printf(x, y, id(weather_font_45), TextAlign::BASELINE_CENTER , "\U000F199F");
}
}
//sun set-rise
it.printf(85, 22, id(sun_icon_font), TextAlign::BASELINE_RIGHT, "\U000F059C");
it.printf(135, 22, id(size_20_font), TextAlign::BASELINE_RIGHT, "%s", id(sunset).state.c_str());
it.printf(85, 44, id(sun_icon_font), TextAlign::BASELINE_RIGHT, "\U000F059B");
it.printf(135, 44, id(size_20_font), TextAlign::BASELINE_RIGHT, "%s", id(sunrise).state.c_str());
//date
it.strftime(210, 43, id(size_50_font), TextAlign::BASELINE_RIGHT, "%d", id(sntp_time).now());
it.printf(213, 43, id(size_14_font), TextAlign::BASELINE_LEFT, "D");
it.strftime(280, 43, id(size_50_font), TextAlign::BASELINE_RIGHT, "%m", id(sntp_time).now());
it.printf(283, 43, id(size_14_font), TextAlign::BASELINE_LEFT, "M");
//line
it.line(0, 54, 296, 54);
//Time
it.strftime(20, 45, id(size_85_font), "%H:%M", id(sntp_time).now());
/* it.strftime(225, 68, id(size_60_font), "%S", id(sntp_time).now()); */
it.strftime(250, 58, id(size_20_font), "%a", id(sntp_time).now());
//wifi
if (id(wifisignal).has_state()) {
x = 265, y = 115;
if (id(wifisignal).state >= -67) {
it.printf(x, y, id(wlan_icon_font), TextAlign::BASELINE_CENTER , "\U000F0928");
} else if (id(wifisignal).state >= -70) {
it.printf(x, y, id(wlan_icon_font), TextAlign::BASELINE_CENTER , "\U000F0925");
} else if (id(wifisignal).state >= -80) {
it.printf(x, y, id(wlan_icon_font), TextAlign::BASELINE_CENTER , "\U000F0922");
} else if (id(wifisignal).state >= -90) {
it.printf(x, y, id(wlan_icon_font), TextAlign::BASELINE_CENTER , "\U000F0920");
} else {
it.printf(x, y, id(wlan_icon_font), TextAlign::BASELINE_CENTER , "\U000F092E");
}
}
//Wifi Signal
it.printf(265, 125, id(size_12_font), TextAlign::BASELINE_CENTER , "%.1f", id(wifisignal).state);
text_sensor:
- platform: homeassistant
entity_id: sensor.openweathermap_forecast_condition
id: forecast_condition
internal: true
- platform: homeassistant
entity_id: sensor.openweathermap_forecast_precipitation
id: forecast_precipitation
internal: true
- platform: homeassistant
entity_id: sensor.moon_phase
id: moon_icon
- platform: homeassistant
id: sunrise
entity_id: sensor.sonnenaufgang
- platform: homeassistant
id: sunset
entity_id: sensor.sonnenuntergang
- platform: homeassistant
entity_id: sensor.wettervorhesage3h
id: wettervorhesage3h
internal: true
- platform: homeassistant
entity_id: sensor.wettervorhesage6h
id: wettervorhesage6h
internal: true
- platform: homeassistant
entity_id: sensor.wettervorhesage9h
id: wettervorhesage9h
internal: true
- platform: homeassistant
entity_id: sensor.wettervorhesage12h
id: wettervorhesage12h
internal: true
- platform: homeassistant
entity_id: sensor.wettervorhesage15h
id: wettervorhesage15h
internal: true
time:
- platform: sntp
timezone: Europe/Zurich
id: sntp_time
sensor:
- platform: homeassistant
entity_id: sensor.openweathermap_forecast_temperature
id: forecast_temperature
internal: true
- platform: homeassistant
entity_id: sensor.MinTemp12h
id: MinTemp12h
internal: true
- platform: homeassistant
entity_id: sensor.openweathermap_forecast_wind_speed
id: forecast_wind_speed
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c13870d71f2d18_temperature
id: bedroom
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c138e3fdf5f483_temperature
id: office
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c1384a262efff1_temperature
id: living_room
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c1382ae3bae706_temperature
id: kitchen
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c13839f5bd7ae1_temperature
id: bath
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c13803ee056ff7_temperature
id: shower
internal: true
- platform: homeassistant
entity_id: sensor.MinTempOut
id: outside_temp
internal: true
- platform: homeassistant
entity_id: sensor.durchschnitt_temp
id: inside_temp
internal: true
- platform: homeassistant
entity_id: sensor.HumidityOut
id: outside_humidity
internal: true
- platform: homeassistant
entity_id: sensor.0xa4c1382ae3bae706_humidity
id: inside_humidity
internal: true
- platform: wifi_signal
name: "WiFi Signal Sensor"
id: "wifisignal"
update_interval: 60s
- platform: homeassistant
entity_id: sensor.MaxTemp12h
id: MaxTemp12h
internal: true