LILYGO TTGO T5 V2.3 2.13 Inch E-Paper Screen - screen full refresh when button is pressed

Hi,
I need help with my LILYGO TTGO T5 V2.3 2.13 Inch E-Paper Screen display.
I have it working just fine with this config ( I have removed irrelevant bits from the config such as wifi, api, ota etc)

esphome:
  name: epaperclock
  platform: ESP32
  board: esp32dev

wifi:
[removed for brevity]

logger:
api:
ota:

spi:
  clk_pin: 18
  mosi_pin: 23

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
      mode:
        input: true
        pullup: false
    name: "Button Input 1"
    id: button_input_1
    on_click:
      then:
        - homeassistant.service:
            service: automation.toggle
            data:
              entity_id: automation.frigate_notifications

display:
  - platform: waveshare_epaper
    id: epaper_display
    cs_pin: 5
    dc_pin: 17
    busy_pin: 4
    reset_pin: 16
    model: 2.90inv2
    update_interval: 1min
    full_update_every: 1
    rotation: 90
    lambda: |-
  [removed for brevity but basically that displays the status of couple of sensors and the automation that is linked to button 1: automation.frigate_notifications]

for that specific screen it would appear that I need to do a full refresh otherwise the screen gets pixelated and unreadable (therefore full_update_every: 1)
This seems to work fine but when I press the button to enable my automation I would like the screen refreshed with the press of the button to refresh the status of that automation on the display. Is that even possible and if it is can someone please point me in the right direction.
Thanks
Andre

1 Like

You could update the screen with this command in your “automation”. This should work :slight_smile:

component.update: epaper_display

full example:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
      mode:
        input: true
        pullup: false
    name: "Button Input 1"
    id: button_input_1
    on_click:
      then:
        - homeassistant.service:
            service: automation.toggle
            data:
              entity_id: automation.frigate_notifications
        - component.update: epaper_display

Maybe you also have to add some “wait” to your automation. Automations and Templates — ESPHome
The information from your home assistant instance are not transmitted immediately to ESP-Home.