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

Moderator: leecollings

Post Reply
Aroby
Posts: 8
Joined: Wednesday 21 September 2016 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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?
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

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

Post by EddyG »

From the dzVents Wiki "silent(): Function. No follow-up events will be triggered: mySwitch.switchOff().silent()."
Do you mean this?
Aroby
Posts: 8
Joined: Wednesday 21 September 2016 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
User avatar
waltervl
Posts: 5905
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

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

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Aroby
Posts: 8
Joined: Wednesday 21 September 2016 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Aroby »

Thanks for the quick reply. I will test it.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest