logo elektroda
logo elektroda
X
logo elektroda

[OpenBeken] How do I add an extra button entity to Home Assistant?

kakrysa 219 0
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21396511
    kakrysa
    Level 15  
    Hi, I managed to re-flash the LED mono controller with a button (hard to say what the original name was as it originally displayed Chinese characters).
    With the help of the forum I "programmed" the button - on pin 14 I have Btn_ScriptOnly.

    In autoexec:

    addEventHandler OnClick 14 backlog POWER toggle; publish Action single
    addEventHandler OnHold 14 add_dimmer 10 2; publish Action hold
    addEventHandler OnDblClick 14 led_dimmer 100; publish Action double
    addEventHandler On3Click 14 led_dimmer 5; publish Action triple

    Actually, when I do a listen on MQTT, when I press I have the corresponding value. But I would like an additional entity to appear, however I don't quite understand - when I set pin 14 to Btn_ScriptOnly - I can't set the channel there. So how do I "expose" to HA this particular button "channel" so that it is visible under the entity.
    I know you can set the channel in the web app to Custom for example... but what channel should I choose? Probably not the same one responsible for turning on the LED, because that is the "switch" (well that one is visible and working). And I'm interested in the "value" that goes behind the button.

    Is this function not yet programmed and you have to set it manually in the Home Assistant configuration?

    I managed the final with a manual MQTT message sent in the broker configuration. It works :) .
  • ADVERTISEMENT
ADVERTISEMENT