previousState(true) for temps not working since 2.4 update

I noticed that previousState(true) has not been working, at least for quantitytype items such as temperatures, since I updated to 2.4. Below is what I’m using to troubleshoot and I get the same temperature output for both. My understanding was that previousState(true) should retrieve the previous state that is different from the current state. However, that is not the case for the below code. I’m using influxdb to persist everyChange for all items. It almost seems like persisted data is stored only as a number whereas the current state is stored as a number with a unit (e.g. 74 °F) and therefore when comparing the current state to any persisted data, it is always different (e.g. 74 °F is different than just 74). What am I missing? Thanks in advance for any help.

TroubleShoot_Var1.postUpdate(Downstairs_Ambient_Temp.state)
            TroubleShoot_Var2.postUpdate(Downstairs_Ambient_Temp.previousState(true, 'influxdb').state)

That is correct.

This is probably a bug that I think needs to be filed at https://github.com/eclipse/smarthome

Since this is dealing with persistence, and all persistence goes through the compat layer (all persistence services are currently 1.x :frowning_face:), the issue probably needs to go here… https://github.com/openhab/openhab1-addons/issues/. I could be wrong though… maybe there’s something up in ESH.

Still looking for some movement with this feature request…

1 Like

I was unaware of that. I thought Persistence had moved over to core and wasn’t still limping along under the compat layer. Good to know.