Extending Blockly with new openHAB commands

I’m not sure because that color denotes arbitrary Strings that can be manipulated - even if they are item names or thing UIDs - you can add suffixes, make substring replacements etc.

Ephemeris arguments I think are too specific to be considered arbitrary strings or numbers or dates, and the manipulation of these is probably not desirable. In the Voice & Multimedia category you have another example, the audio sinks and voices. While they are technically Strings the fact that they’re in another color entirely means the user should reuse them as-is and leave them be.

Note that you can update blocks based on e.g. the value chosen in a dropdown: see https://github.com/google/blockly/blob/master/blocks/math.js, the implementation of the blocks in the Math category. If you try the “0 is even” block and change the dropdown to “is divisible by” you’ll see that an input is appended to the block. Also in the “1 + 1” block you’ll see that the tooltip changes based on the chosen operation.

The file above has the implementation for those; it’s a little convoluted since they use mixins and mutators.

For reference in the Blockly repo (GitHub - RaspberryPiFoundation/blockly: The web-based visual programming editor.) you can find the block definitions of the standard blocks in blocks and the code generation in generators/javascript.