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); }
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden