I’m working on creating my first widget for OH3, but have gotten stuck and am hoping for some help.
This is a control for my Harmony remote.
Per my attached image I have two examples of what I am trying to do.
I would either like to 1/ make the icon a push button, or 2/ instead of using text on the button would like to have an icon.
I’ve pasted some code snippets so you can see how each of the controls are created.
Any help would be greatly appreciated. When this is working properly, I will definately share this widget with everyone, since I am using borrowed code from other member (Heating control widget) as my starting point for creating it.
This is the code for the icon:
- component: f7-col config: class: - display-flex - align-items-center - flex-direction-column slots: default: - component: f7-icon config: f7: arrow_down_to_line size: 36 color: blue class: - margin-top
This is the code for the push button:
- component: oh-button config: text: PG-DN action: command actionItem: =(props.itemHarmony) actionCommand: PageDown large: true raised: true class: - margin
Here is what the total widget looks like. Note i have both an icon view and pushbutton view together on the same widget, this is temporary so I can show what I am trying to accomplish.
Thanks for your help.