Blockly separate tests for trigger and current status

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
wormiedk
Posts: 15
Joined: Wednesday 18 May 2016 5:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly separate tests for trigger and current status

Post by wormiedk »

As far as I understand blocky the event that "triggers" the blocky has to be first in the if statement e.g. the following should get triggered if dev1 changes state only if ItsDark is set to on. However ItsDark does not have to change state:
IF dev1=On and ItsDark=On
I also assume that the following would not work as it would require ItsDark to change state before checking the status of dev1 :
IF ItsDark=On and dev1=On

I think it would be more clear if there were two kind of comparisons e.g.:
If dev1 changes to On and ItsDark is On

Also the new If/Then/Else block is great and allows for nested ifs e.g.
If ItsDark=On then
If dev1=On then
However this structure does not get triggered if dev1 changes while it is dark as it requires ItsDarks state to change.

Please let me know if the above is correct as it would explain many of my problems using blocky.

Cheers

David
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests