Hello
I'm trying to create an item that stores the total number of hours the computers are on.
I have created a calculated item
key= total.hours
Fomula = last("total.hours")+diff("system.uptime")

But if it's the first time or it has no total value.hours gives an error.
"Cannot evaluate expression: "Cannot evaluate function "last()": item "pd2008:total.hours" not supported."
How can I store and add up all the hours that the item is active?
The idea is to add them to the inventory as too.
Thanks
I'm trying to create an item that stores the total number of hours the computers are on.
I have created a calculated item
key= total.hours
Fomula = last("total.hours")+diff("system.uptime")
But if it's the first time or it has no total value.hours gives an error.
"Cannot evaluate expression: "Cannot evaluate function "last()": item "pd2008:total.hours" not supported."
How can I store and add up all the hours that the item is active?
The idea is to add them to the inventory as too.
Thanks
Comment