I’m using OH Version: 5.0.1
Since an update to JS scripting (v5.11.1), there are additional item properties such as lastStateUpdateTimestamp or lastStateChangeTimestamp.
Until now, I had created several items for this, but with the new properties, they would become obsolete.
Can these properties also be used in custom widgets?
My attempts with a test widget were unsuccessful.
uid: test_widget
tags:
props:
parameters:
- context: item
description: An item to control
label: Item
name: item
required: false
type: TEXT
parameterGroups:
timestamp: Oct 12, 2025, 1:47:21 PM
component: f7-card
config:
title: ‘=(props.item) ? "State of " + props.item : “Set props to test!”’
footer: ‘=dayJS(items[props.item].stateLastUpdateTimestamp)
.format(“DD.MM.YYYY HH:mm:ss”)’
content: =items[props.item].displayState || items[props.item].state
BR Ulf