sairon / esphome-nspanel-lovelace-ui

ESPHome component for NSPanel Lovelace UI
Other
126 stars 31 forks source link

Feedback "soft beep" on screen button touch feature #13

Closed chrislauyp closed 1 year ago

chrislauyp commented 1 year ago

Hi there, Anyone has got a solution? ideally locally from esp/nextion (for most responsive audio feedback), if not via integration/automation between HA/NSP! Thanks in advance!

sairon commented 1 year ago

You can use on_incoming_message for this, simple example (beeping only on button press events):

  on_incoming_msg:
    then:
      if:
        condition:
          lambda: |-
            return x.rfind("event,buttonPress2", 0) == 0;
        then:
          - rtttl.play: "beep:d=4,o=5,b=100:32a6"