docbender / openHAB-Simatic

openHAB binding for Siemens Simatic S7 PLC
Eclipse Public License 2.0
20 stars 4 forks source link

O.H. 4.0 (Unit) number channel with command address and unit is not updated #46

Closed grzegorz914 closed 1 year ago

grzegorz914 commented 1 year ago

Hi,

after latest update in O.H. 4.x and support default unit for Number the channels which uses command address and unit are not updated anymore, always return 0. After remove unit all working correct. Linked item is Number Dimensionless

IMG_0841

Thanks Grzegorz

docbender commented 1 year ago

It is working for me.

Isn't the problem that OH now displays percentages in the range 0-1? Received values are divided by 100. So OH displays 1, if PLC value is 100.

grzegorz914 commented 1 year ago

Yes, that was the problem, my Channels are 0-100%.

docbender commented 1 year ago

Set items metadata to unit = %, then OH displays values as 0-100.