LVGL on an ESP32-8048S050C: LVGL Locking

I would like my panels to not respond to touch under certain circumstances. I currently have them pause LVGL and turn off the backlight when no PIR signal is detected, but they still register touch, activating buttons that are not visible.

Is there a good way to ignore touch and truly “lock” the screen? I think that LVGL is resuming with the touch, even though the backlight is not coming on.

My only LVGL “resumes” are gated with conditions that are not met when this is occurring:


touchscreen:
  - platform: gt911
    id: !extend main_touchscreen
    on_release:
      then:
        - if:
            condition:
              and:
                - lvgl.is_paused
                - lambda: 'return id(ha_cpls_responsive).state == "on";'
                - lambda: 'return id(ha_house_alarm_cpl).state == "disarmed";'
            then:
              - logger.log: "LVGL resuming due to touch."
              - lvgl.resume:
              - lvgl.widget.redraw:
              - light.turn_on: backlight

Thanks for your input.

If buttons are reacting, it’s not paused. You didn’t show the code that pauses it.

1 Like

Here is where the pause comes from:

binary_sensor:
  - platform: gpio
    pin: GPIO17
    id: pir
    name: "PIR Sensor"
    device_class: motion
    on_release: 
      then:
        - logger.log: "LVGL is pausing due to PIR motion inactivity."
        - light.turn_off: backlight
        - lvgl.pause:

You did read the docs and set resume_on_input: false I presume?

I think that took care of it!

While I most definitely did read the docs (I wouldn’t have made it this far without them; they are excellent), I missed that option.

Thank you very much for pointing it out.