Page 1 of 1

Virtual Sensor Switch On/Off only for status not for activation

Posted: Friday 07 January 2022 12:02
by Aroby
Is it possible to show a "On" or Off" status without the possibility to operate the virtual sensor?

For example when I use a virtual switch you can operate it but that is not the idea. It's only for presenting the status. I tried to use the protected option but in that case a Lua script can't change it either.

or when I use a virtual sensor - text. it's possible to show the "on" or Off" status. But in that case You don't see an icon change when activated.

What do you use to overcome this?

Re: Virtual Sensor Switch On/Off only for status not for activation

Posted: Friday 07 January 2022 12:04
by EddyG
From the dzVents Wiki "silent(): Function. No follow-up events will be triggered: mySwitch.switchOff().silent()."
Do you mean this?

Re: Virtual Sensor Switch On/Off only for status not for activation

Posted: Friday 07 January 2022 12:43
by Aroby
The idea is to show an "Off" or "On" state only. Without being able to click on it and accidentally toggle it (like with a virtual switch). A Lua script in the background should be able to change the state.

Re: Virtual Sensor Switch On/Off only for status not for activation

Posted: Friday 07 January 2022 13:12
by waltervl
Edit the dummy switch to a sensor switch like Contact, Door contact, Motion sensor etc. I believe those cannot be switched from User interface. You can change the Icon to the desired one.
https://www.domoticz.com/wiki/Dummy_for ... h_Subtypes

Re: Virtual Sensor Switch On/Off only for status not for activation

Posted: Friday 07 January 2022 13:23
by Aroby
Thanks for the quick reply. I will test it.