Blockly light green and dark green boxes

What is the difference between light green and dark green boxes?
I had WARN messages showing up running a rule where I discoved the different green boxes. After the update of all boxes (boxes changed from light green to dark green) the warn messages no longer showed up (coincidence?).
Attached find an example (not the one which caused the error):

Hi Bernhard,

The light (green) colored blocks are so called “shadow” blocks. There are auomatically provided as default blocks for the block that you drag into the workspaces. You can conveniently just fill them out. However, you cannot copy and paste them, which sometimes is annoying when you want to use the same block multiple times (try to move a light green one - it won’t work).

Since OH 4 on I have added a functionality that automatically converts a shadow block into a real block as soon as something is changed in that block and then that block can be taken out and even duplicated. “Real” blocks then do not have the light color but the dark one.

Does that answer your question?

1 Like

Hi Stefan,
thank you for your quick reply. In my case I can copy the light green blocks:
Duplicate a block and add new block with shadow item “MyItem”:

The item “NET_ALL” is a real item which i have added some time ago but the item “MyItem” is a shadow item which need to be replaced by a real item. Both items are in a light green box.

I have many light green blocks in my blockly rules with selected real items. An I have blocks like “ON” and “OFF” in the screenshot which are light green or dark green. If I click on “NET_ALL” to replace it I can pick the same item from the model and the box stays light green … only if I pick another item the block gets dark green.

Do the rules work with a mixture of light green and dark green blocks?

Yes, they do. A shadow block works identical to a dark colored one.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.