Problem with previousState timestamp

openHAB 3.4.4

console.info(items.getItem("Pool_Pump_Switch").history.previousState(true));
console.info(items.getItem("Pool_Pump_Switch").history.previousState(true).timestamp);

Gives

2023-08-04 18:37:57.428 [INFO ] [.openhab.automation.script.ui.ecma12] - ON
2023-08-04 18:37:57.456 [INFO ] [.openhab.automation.script.ui.ecma12] - undefined

JDBC MariaDB

time;value
2023-08-04 17:58:07,577  OFF
2023-08-04 17:56:25,861  ON

It worked in ECMA 5
I am converting all ECMA 5 rules to ECMA 11 before update.

Maybe now it’s .getTimestamp? See

Hmm… referring to

it’s not.

But at least the way to get the item is very different… Maybe that’s causing an issue here.

Is also returning undefined.

Sorry, did an edit above