From 1d32067ef89509ba0f93960894c975eb8f1e70da Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Wed, 2 Feb 2022 23:43:34 +0100 Subject: [PATCH] Shifted GPIOs around for final breakout board. Removed a pushbutton. Click/doubleclick for 1 button. --- esphome/epaperframe.yaml | 65 ++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/esphome/epaperframe.yaml b/esphome/epaperframe.yaml index a503d0c..c1bb336 100644 --- a/esphome/epaperframe.yaml +++ b/esphome/epaperframe.yaml @@ -43,32 +43,28 @@ binary_sensor: inverted: True name: "Refresh screen" internal: True - on_click: - then: - - logger.log: - level: INFO - format: 'Button pressed, refreshing screen!' - - component.update: epaper + on_multi_click: + - timing: + - ON for at most 1s + - OFF for at most 0.3s + - ON for at most 1s + - OFF for at least 0.2s + then: + - logger.log: + level: INFO + format: 'Button doubleclick, rendering next page!' + - display.page.show_next: epaper + - component.update: epaper + - timing: + - ON for at most 1s + - OFF for at least 0.5s + then: + - logger.log: + level: INFO + format: 'Button click, refreshing screen!' + - component.update: epaper -# Switch to next page - - platform: gpio - pin: - number: GPIO13 - mode: INPUT_PULLUP - inverted: True - name: "Next page" - internal: True - on_click: - then: - - logger.log: - level: INFO - format: 'Button pressed, rendering next page!' - - display.page.show_next: epaper - - component.update: epaper - -# DHT22 sensor sensor: - # WiFi signal strength - platform: wifi_signal name: "WiFi Signalstärke" @@ -165,17 +161,6 @@ text_sensor: entity_id: sensor.wohnzimmer_feinstaub_warnstufe id: wzpm -# Webserver configuration -web_server: - port: 80 -# css_include: "esphome-docs/_static/webserver-v1.min.css" -# css_url: "" -# js_include: "../../../esphome-docs/_static/webserver-v1.min.js" -# js_url: "" - auth: - username: admin - password: !secret web_server_password - time: - platform: homeassistant id: homeassistant_time @@ -312,15 +297,15 @@ image: spi: clk_pin: 23 - mosi_pin: 32 + mosi_pin: 22 display: - platform: waveshare_epaper id: epaper - cs_pin: 27 - dc_pin: 26 - busy_pin: 33 - reset_pin: 25 + cs_pin: 19 + dc_pin: 21 + busy_pin: 16 + reset_pin: 17 model: 7.50in # full_update_every: 30 # not supported on this display update_interval: never