Itemtype in forEach loop

Okay, so [quote=“tnemrap, post:17, topic:22232”]
lamp.historicState(now.minusDays(1)).state
[/quote]
works, but not [quote=“tnemrap, post:17, topic:22232”]
lamp.historicState(Scene_Cleaning_Start.state)
[/quote]

We can guess Scene_Cleaning_Start.state isn’t digestable. I reckon this is one of those cases that shows up Joda time is not interchangeable with Openhab datetime items. Might be clues about conversion here

I’m sure I’ve seen a better guide to conversion but cannot find it now.