sairon / esphome-nspanel-lovelace-ui

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

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

Closed chrislauyp closed 2 years ago

chrislauyp commented 2 years 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 2 years 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"