Blockly: How to extract the number from an item state?

Feed your Item state into a variable first, and then use the append block (with an empty text block attached) to force the variable into a string. And then do your slicing.

:person_shrugging:

Probably. Did you try the method outlined in the post I linked?

Personally I don’t use any of the smart units stuff in openHAB - just keep everything in simple plain numbers.

1 Like