assign value on user confirmation (button click)



  • Hi,

    I have succesfully imported a bunch of values out of a xml file to variable repositories. Just to keep the topic simple and readable in future I ask this question in a new thread.
    Now I want to have some kind of user confirmation (for example a click on a button) that the data was checked and should be sent to the nodes. I can write a simple script to assign the values from the repositories to the sensor values (by their UUID), but I don't know how to activate that script by butten or other user input.

    Regards,
    Anduril


  • ADMIN

    @anduril There is no direct option available to archive this setup. However, we have a workaround.

    • Create a virtual node/sensor - Binary sensor (will give switch type)
    • Add your virtual button(virtual sensor) to the dashboard
    • Create an operation to execute a script
    • Implement two rules that should trigger script operation when there is a change in the button
    • If you want to control based on switch ON/OFF state, just read this switch state on your script.

    Screenshots:

    Operation to execute script:

    0_1525356581841_d79b2213-c1df-490c-877f-107f47f3a54b-image.png

    A rule for switch ON state:

    0_1525356344044_161a4013-9614-47e0-be21-7b31a2c0b87c-image.png

    A rule for switch OFF state:

    0_1525356371901_0461c12d-a04f-4c80-8d04-9408e13a7944-image.png

    Virtual switch on dashboard:

    0_1525356600324_ea7aa4a3-2d68-4991-b323-734fbe3877db-image.png


 

Suggested Topics

3
Online

375
Users

354
Topics

2.1k
Posts