I’m trying to reference an item in an oh-repeater array, and using the " BoGoB: Big Ol’ Grid O’ Buttons widget as the foundation for my remote control widget.
But rather than doing this, directly naming the actionItem in the array, which does work:
(shortened for brevity)
- component: oh-repeater
config:
for: i
fragment: true
in:
- - 1
- 1
- 1
- 1
- Apple_TV_TvStue_Power_Status
- component: oh-button
config:
action: command
actionCommand: =loop.i[3]
actionItem: =loop.i[4]
I would rather have something like this, so I could have 1 widget and using that for several remotes:
props:
parameters:
- context: item
label: Apple TV Remote
name: remote
required: true
type: TEXT
...
- component: oh-repeater
config:
for: i
fragment: true
in:
- - 1
- 1
- 1
- 1
- =[props.remote]
- component: oh-button
config:
action: command
actionCommand: =loop.i[3]
actionItem: =loop.i[4]
I thought it was quite trivial to do (and it probably is! ), but I feel like i’ve tried all sorts of combinations with =items[props.remote], =items[props.remote].name, etc etc…its like I can’t see the forrest for the trees so someone please show me the forrest