Device plugins, when fields are used with expressions now received newer implementation of the expressions processing engine. In this new engine, strict type of each parameter is checked and it is not possible to add boolean to number or string.
You can use isnumber(xxx), isboolean(xxx) test functions as well as tonumber(xxx), tostring(xxx), toboolean(xxx) functions for converting type of argument.
New reserved words now also available to use: null, true and false.
We will safely upgrade existing plugin expressions with the intended result type soon. For example if you have field with expression: "din & 0x8" and result type boolean, it will be converted to "toboolean(din & 0x8)". At the same time, we will remove result_type specifier. This will give you the possibility to specify not only booleans and numbers as a result of expression but also nulls and strings.
We have checked and tested all expressions in all fields of all existing plugins so the update should be safe for all our users.