Custom JS:
Replace number with visu page id found in URL: http://192.168.0.10/apps/data/visu/#12
Visu.showPlan(12) is when ga 0/0/1 is ON and Visu.showPlan(5); is when 0/0/1 is OFF
If it is for a doorbell, you can put an event script on 0/0/1 to set it back to OFF after a certain time
Code:
localbus.listen('object', '0/0/1', (value) => {
if (value) {
Visu.showPlan(12);
}
else {
Visu.showPlan(5);
}
});
Visu.showPlan(12) is when ga 0/0/1 is ON and Visu.showPlan(5); is when 0/0/1 is OFF
If it is for a doorbell, you can put an event script on 0/0/1 to set it back to OFF after a certain time