NEWS
Start a script if select a view or a widget .... deselection
-
Hi
In order not to put too much load on my Raspberry, I only want to run certain JavaScripts when a certain view or widget is selected.
It makes no sense and not necessarily to run extensive scripts if they are not required at all at a time. If the view is selected then I would like a cyclic processing.In the widget script tab you could put an ioBroker object and script. But that doesn't work in the view or even widget-specifically, because the contents in the script tab are the same for all widgets.
In addition, I still don't quite understand when the scripts are processed in the script tab or it is unclear how I can end the processing of the scripts again after deselecting the views.I've asked already a number of questions related to this. Already received several helpful reactions but do not see the functionalty clearly. And unfortunately I still haven't found a description of it.
I didn't find any documentation for vis.setValue or vis.xxx either.
Am I too demanding?
have tested with the code bellow. But I'd be happy if I found a basic documentation
if ("javascript.0.variables.test"){ vis.setValue("javascript.0.variables.test", false); } else { vis.setValue("javascript.0.variables.test", true); }