while domoticz.devices('hladina4').state == 'On' do
cerpadlo.switchOn().checkFirst ()
ventil4.switchOn().checkFirst ()
end
cerpadlo.switchOff().checkFirst ()
ventil4.switchOff().checkFirst ()
end
Is this entry possible?
Why doesn't the red part of the code execute?
Thanks
Vikin
While do
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: While do
This while loop does not make sense.
dzVents does receive the state of all devices at the start of the script and will not get devicestate updates during execution of the script. So if the devicestate = 'On' at the the start of the script. dzVents (but also true for classic Lua and Blockly) will see only this 'On' state.
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
-
- Posts: 3
- Joined: Thursday 04 June 2020 12:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: While do
Thank you for the explanation.
Who is online
Users browsing this forum: No registered users and 1 guest