Created
July 9, 2024 13:49
-
-
Save cubapp/e15ca78a5ec6e8021f3e91cf8908331e to your computer and use it in GitHub Desktop.
ESP32 with small eInk to display data from HomeAssistant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: esphome-eink-01 | |
on_boot: | |
priority: 700 | |
then: | |
- delay: 3sec | |
- component.update: my_display | |
- delay: 200ms | |
- component.update: my_display | |
- delay: 200ms | |
esp32: | |
board: esp32dev | |
framework: | |
type: arduino | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
encryption: | |
key: "heslo" | |
ota: | |
- platform: esphome | |
password: "heslo" | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "Esphome-Eink-01 Fallback Hotspot" | |
password: "heslo" | |
captive_portal: | |
one_wire: | |
- platform: gpio | |
pin: GPIO04 | |
id: teplo_FVE | |
# Example configuration entry | |
sensor: | |
- platform: dallas_temp | |
address: 0xff3c01b556edff28 | |
id: teplo_FVE_OK | |
name: "ESP Home - Teplota FVE" | |
time: | |
- platform: homeassistant | |
id: esptime | |
text_sensor: | |
- platform: homeassistant | |
entity_id: sensor.house_consumption | |
name: "Spotreba" | |
id: today_FVE_gen | |
- platform: homeassistant | |
entity_id: sensor.esp_home_teplota_venku | |
name: "TeplotaVenku" | |
id: teplota_venku | |
- platform: homeassistant | |
entity_id: sensor.pv_power | |
name: "PV Power" | |
id: pv_power | |
- platform: homeassistant | |
entity_id: sensor.today_s_pv_generation | |
name: "Dnes vygenerovano" | |
id: pv_today | |
- platform: homeassistant | |
entity_id: sensor.battery_state_of_charge | |
name: "SOC" | |
id: pv_soc | |
- platform: homeassistant | |
entity_id: sensor.battery_temperature | |
attribute: temperature | |
id: teplo_baterka | |
font: | |
- file: 'gfonts://Roboto' | |
id: font1 | |
size: 20 | |
- file: 'gfonts://Roboto' | |
id: font3 | |
size: 12 | |
- file: 'gfonts://Anton' | |
id: font2 | |
size: 20 | |
- file: 'gfonts://Roboto' | |
id: font4 | |
size: 24 | |
spi: | |
clk_pin: 13 | |
mosi_pin: 14 | |
display: | |
- platform: waveshare_epaper | |
id: my_display | |
# rotation: 180 | |
cs_pin: 15 | |
dc_pin: 27 | |
busy_pin: 25 | |
reset_pin: 26 | |
model: 1.54inv2 | |
update_interval: 60s | |
# full_update_every: 30 | |
lambda: |- | |
it.strftime(10, 1, id(font2), " %d/%b/%Y %H:%M", id(esptime).now()); | |
it.line(0,27,200,27); | |
it.printf(0, 35, id(font4), "Teplo tu: %.1f °C", id(teplo_FVE_OK).state); | |
it.printf(0, 60, id(font4), "Venku je: %s °C", id(teplota_venku).state.c_str()); | |
it.printf(0, 110, id(font1), "Vyroba: %s W", id(pv_power).state.c_str()); | |
it.printf(0, 135, id(font1), "SOC: %s %%", id(pv_soc).state.c_str()); | |
it.printf(0, 160, id(font1), "PV today: %s kWh", id(pv_today).state.c_str()); | |
it.line(0,182,200,182); | |
it.strftime(0, 185 , id(font3), "Updated: %d/%b/%Y %H:%M", id(esptime).now()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment