Hi everyone,
I would like to create something like this,
If power < 1w and nobodyhome=true and this has been like this for 5 min then
set switch of 300 min
Is this possible in blocky?
time variable?
Moderator: leecollings
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: time variable?
I suggest you look at the possible script languages like lua, php, shell, python,... Then everything is possible.
Re: time variable?
Hi micksel,
as far as I know there's no Blockly component like "otherdevices_lastupdate" in LUA. But you can create your own timer. I'll show you an example:
I created a user variable with the name "teller" and the variable type = "Integer". I used an existing switch "OnOff 2" and created the following Blockly: When the switch is Off, the "teller" will increase every minute untill it reaches "5". When the switch is On, it will set the "teller" to "0". There is one catch: status will only change on the full minute. So when the switch turns On at 13:42:02 and it turns Off at 13:42:56, the script will not set the "teller" to "0". And at exactly midnight (= 00:00) it will not do anything.
Maybe this info helps a little.
as far as I know there's no Blockly component like "otherdevices_lastupdate" in LUA. But you can create your own timer. I'll show you an example:
I created a user variable with the name "teller" and the variable type = "Integer". I used an existing switch "OnOff 2" and created the following Blockly: When the switch is Off, the "teller" will increase every minute untill it reaches "5". When the switch is On, it will set the "teller" to "0". There is one catch: status will only change on the full minute. So when the switch turns On at 13:42:02 and it turns Off at 13:42:56, the script will not set the "teller" to "0". And at exactly midnight (= 00:00) it will not do anything.
Maybe this info helps a little.
Who is online
Users browsing this forum: No registered users and 1 guest