Hello
Say Level 2 is selected (hence the bulb is on). Then click on the bulb: it switches to Off but selector Level 2 remains selected instead of being set to Off (see attachment) which seems to me what one could expect. Any thoughts?
Running 2020.2 12485
Thank you
Selector: issue with off mode [Solved]
Moderator: leecollings
-
Number8
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Selector: issue with off mode
Debian buster on NUC and three RPi with buster.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Selector: issue with off mode
This is by design. Check this topicNumber8 wrote: Tuesday 11 May 2021 0:14 Hello
Say Level 2 is selected (hence the bulb is on). Then click on the bulb: it switches to Off but selector Level 2 remains selected instead of being set to Off) which seems to me what one could expect. Any thoughts?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Number8
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Re: Selector: issue with off mode
Thanks @waaren. OK I got it, but what I want is to get the selection action attached to level 0 executed. When .silent() is removed an infinite loop is created. How to get it executed only once?
Debian buster on NUC and three RPi with buster.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Selector: issue with off mode [Solved]
Use something like belowNumber8 wrote: Tuesday 11 May 2021 7:36 Thanks @waaren. OK I got it, but what I want is to get the selection action attached to level 0 executed. When .silent() is removed an infinite loop is created. How to get it executed only once?
Code: Select all
return
{
on =
{
devices =
{
'mySelector'
},
},
logging =
{
level = domoticz.LOG_DEBUG ,
marker = 'selector',
},
execute = function(dz, item)
if item.nValue == 0 and item.level ~= 0 then
item.switchSelector('Off')
dz.log('Action required (nValue == 0 and level left at '.. item.level ..')' ,dz.LOG_DEBUG)
elseif item.nValue == 0 then
dz.log('No action required (nValue and level both 0)' ,dz.LOG_DEBUG)
else
dz.log('No action required (nValue ~= 0) ',dz.LOG_DEBUG)
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest