- openHAB version: 2.5.6
- Issue of the topic:
Trying to ‘get’ the State of an Item who’s name is derived from the Name of a triggeringItem in a different group.
I’m aiming for a rule that does the following
Item of a group triggers a rule
The triggeringItem name is captured, split so that the .get(0) part can added to a different suffix.
Alarm1Minute becomes Alarm1Hour
In an IF statement that checkes to see if the Alarm1Minute is >59, the corresponding Hour value needs to be fetched & increased by 1.
I can compile the new Item name, but I don’t know how to use that to poll / get the State of the corresponding Hour Item.
var newHour = Alarm1Hour.state.toInt +1
var Hour = triggeringItem.spilt("Min").get(0) var newHour = Hour.state.toInt +1
Results in an error saying that
.state is not a member of the
Is what I’m trying to do possible? Or am I barking at the moon?