Hi, since this was a common and recurring issue, I finally resorted to query the API when an item’s state with a transformation applied changes.
Here’s a summary of the changes:
- There is an additional API query each time the item’s state is updated, but only when for items having a transformedState. If you have a frequent update on items with transforms you might experience some performance issues;
- Dummy widgets and switches display the transformed (i.e. mapped) state if available;
- The
itemState
(formerlyitemValue
) function in templates also now returns the transformed state by default, unless you set the new second parameter totrue
i.e.itemState('Item_With_Map', true)
. Use the raw state in conditions likeng-if
without the transformation if possible.
Remember you need to have an openHAB version including @lolodomo’s PR, that is, snapshot 849 or newer.