It’s been there longer but you probably noticed it only now.
For a fix see this short description, for the reason see the long UoM change thread for OH4.
With over 35000 items I am too lazy to add unit everywhere afterwards. I have simply removed the log message.
Search for the following 'is a UoM item but "unit" is not found in item metadata:
sudo grep -r 'is a UoM item but "unit" is not found in item metadata' /opt/habapp/lib/python3.10/site-packages/HABApp
/opt/habapp/lib/python3.10/site-packages/HABApp/openhab/map_items.py: log.warning(f'Item {name:s} is a UoM item but "unit" is not found in item metadata')
grep: /opt/habapp/lib/python3.10/site-packages/HABApp/openhab/__pycache__/map_items.cpython-310.pyc: binary file matches
This tells me that I need to edit the /opt/habapp/lib/python3.10/site-packages/HABApp/openhab/map_items.py file:
...
# Show warning
# https://github.com/spacemanspiff2007/HABApp/issues/383
if 'unit' not in meta:
pass
#log.warning(f'Item {name:s} is a UoM item but "unit" is not found in item metadata')
...
This may not necessarily be the most desirable solution, but if you know exactly what you are doing, you can live with this solution quite well.