esphome: name: device_name friendly_name: device_name esp32: board: esp32dev framework: type: esp-idf logger: debug: update_interval: 5s api: encryption: key: !secret api_key actions: - action: set_screen variables: screen_num: int then: - if: condition: lambda: 'return (screen_num == 1.0);' then: - display.page.show: page1 - action: next_screen then: - display.page.show_next: my_display ota: - platform: esphome password: !secret ota_password wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "device_name Fallback Hotspot" password: !secret wifi_fb_password interval: - interval: 1min then: - display.page.show_next: my_display - component.update: my_display font: - file: "gfonts://Roboto" id: roboto_20 size: 20 - file: "gfonts://Roboto" id: roboto_50 size: 50 sensor: - platform: template id: esp_memory icon: mdi:memory name: Free Memory lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024; unit_of_measurement: 'kB' state_class: measurement entity_category: "diagnostic" - platform: debug free: name: "Heap Free" loop_time: name: "Loop Time" - platform: hx711 name: "HX711 Value grams" dout_pin: GPIO4 clk_pin: GPIO2 gain: 128 update_interval: 5s filters: - calibrate_linear: - 443980.1111 -> 0 - 761047.5556 -> 1180 unit_of_measurement: g - platform: uptime name: filament weigher Uptime - platform: wifi_signal name: filament weigher WiFi Signal update_interval: 60s id: wifi_signal_db - platform: copy source_id: wifi_signal_db name: "filament weigher WiFi Signal Percent" filters: - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); unit_of_measurement: "Signal %" entity_category: "diagnostic" device_class: "" - platform: internal_temperature name: "filament weigher Internal Temperature" text_sensor: - platform: version name: "Device ESPHome Version" id: device_esphome_version internal: true icon: 'mdi:chevron-right' - platform: wifi_info ip_address: name: IP Address - platform: debug device: name: "Device Info" reset_reason: name: "Reset Reason" - platform: homeassistant id: weight_text_from_ha entity_id: sensor.device_name_hx711_value_grams - platform: homeassistant id: date_text_from_ha entity_id: sensor.date_command - platform: homeassistant id: own_ip_text_from_ha entity_id: sensor.device_name_filament_weigher_ip_address - platform: homeassistant id: own_wifi_signal_text_from_ha entity_id: sensor.device_name_filament_weigher_wifi_signal_percent - platform: wifi_info ip_address: name: filament weigher IP Address address_0: name: filament weigher IP Address 0 address_1: name: filament weigher IP Address 1 mac_address: name: filament weigher Mac Wifi Address # scan_results: # name: ESP Latest Scan Results dns_address: name: filament weigher DNS Address spi: clk_pin: GPIO14 mosi_pin: GPIO27 # 296 x 128 display: - platform: waveshare_epaper id: my_display cs_pin: GPIO32 dc_pin: GPIO33 busy_pin: GPIO26 reset_pin: GPIO25 model: 2.90inv2-r2 full_update_every: 300 rotation: 90 pages: - id: page1 lambda: |- it.rectangle(0, 0, 296, 128); it.rectangle(3, 3, 290, 122); it.print(6, 6, id(roboto_20), id(date_text_from_ha).state.c_str()); it.print(6, 28, id(roboto_20), id(own_ip_text_from_ha).state.c_str()); it.print(140, 28, id(roboto_20), id(own_wifi_signal_text_from_ha).state.c_str()); it.print(170, 28, id(roboto_20), " % Signal"); it.print(6, 48, id(roboto_50), id(weight_text_from_ha).state.c_str()); it.print(120, 48, id(roboto_50), "g");