You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #3247 was either misunderstood or hijacked and is not going to get discussed/in an implementation direction here a follow up issue:
UoM item states can scale based on the commands that get sent to them.
E.g. and item "length" can be either "1 m" but also "3 km".
Small scripts and integrations that use the RestAPI don't implement the UoM and just strip the unit away.
This leads to unexpected behavior.
E.g.
The user implements his script that reads the distance from e.g. work which is reported in km. This works well, however one day the distance gets less and a command with the unit m gets sent.
Since the script strips the unit away it now thinks that the user is 500km away from work when in reality it's just 500m.
To prevent this I suggest we add another parameter that allows normalization for the value that is sent through the RestAPI, SSE Event handler and of course Websockets.
To tackle this I suggest we add another parameter 🙄 that sets the normalization unit and scale.
Until this is figured out using UoM items together with scripts, HABApp and NodeRed can be considered more or less broken.
I still think it would be much more elegant to allow the user to pick the openHAB internal normalization and use this normalized value for persistence, Rest API, etc..
It would make a consistent user experience with no downsides and it would be immediately clear what is going on and how everything will work.
The text was updated successfully, but these errors were encountered:
Since #3247 was either misunderstood or hijacked and is not going to get discussed/in an implementation direction here a follow up issue:
UoM item states can scale based on the commands that get sent to them.
E.g. and item "length" can be either "1 m" but also "3 km".
Small scripts and integrations that use the RestAPI don't implement the UoM and just strip the unit away.
This leads to unexpected behavior.
E.g.
The user implements his script that reads the distance from e.g. work which is reported in km. This works well, however one day the distance gets less and a command with the unit m gets sent.
Since the script strips the unit away it now thinks that the user is 500km away from work when in reality it's just 500m.
To prevent this I suggest we add another parameter that allows normalization for the value that is sent through the RestAPI, SSE Event handler and of course Websockets.
To tackle this I suggest we add another parameter 🙄 that sets the normalization unit and scale.
Until this is figured out using UoM items together with scripts, HABApp and NodeRed can be considered more or less broken.
I still think it would be much more elegant to allow the user to pick the openHAB internal normalization and use this normalized value for persistence, Rest API, etc..
It would make a consistent user experience with no downsides and it would be immediately clear what is going on and how everything will work.
The text was updated successfully, but these errors were encountered: