assign value on user confirmation (button click)
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.
@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.
Operation to execute script:
A rule for switch ON state:
A rule for switch OFF state:
Virtual switch on dashboard: