Using the "button" widget



  • @user2684

    I am looking for a way to send a "1" via MQTT. The most convenient way seems to be using the "button". But there is no way to associate the button to a sensor like other widgets.
    The only thing one can do with a button is starting actions.
    I have been looking for the description how to create/formulate actions. I did not find those syntax descriptions.

    Your advice please.



  • @eporocrail You're right, documentation is lacking here (https://github.com/egeoffrey/docs.egeoffrey.com/issues/6). The button widget does not link with any sensor but uses the same format as the "Actions" you have in the rules in which you can:

    • Set value to a sensor (SET sensor_id value). If the sensor is an actuator of course this will be also sent along
    • Run a rule (RUN rule_id)
    • Poll a sensor configured in pull mode (POLL sensor_id)


  • @user2684

    Wonderful! It works.

    button.jpg

    However I do have an issue with this one. In essence with the widget as displayed, three times the same message is conveyed:

    the icon, the text of the widget and the text of the button all depict the same information.

    IMHO the text of the button would suffice.



  • @user2684
    Maybe it is possible to make it user selectable to display the "widget title" yes or no.
    That enhances user flexibility for all widgets.

    Maybe it is possible to make it user selectable to display the "icon" yes or no. When the icon field is empty the "icon" part of the element is not displayed at all.
    Enhances user flexibility and leaves more display space.



  • IMHO the text of the button would suffice.

    True, I did notice the same. Bu unfortunately the top text is the widget title which is common among all the widgets so pretty complex to change everywhere. Try using an empty space as title, it should work even if not solving the spacing problem probably.



  • @user2684
    Point taken. Just leave it as it is. Only minor detail.


Log in to reply