I’m looking for a starting point to create my own widgets in OH3.
Somewhere in the documentation I found the information that all UI components are based upon Framework7. This explains those shortcuts starting with f7- in the YAML-files of the widget definitions. But neither the F7 documentation, nor the OH docs explain which components could be nested?!
Each widget starts with a kind of header:
uid: test
tags: [test]
props:
parameters:
- description: Prefix for the items with the data
label: Item prefix
name: prefix
required: false
type: TEXT
parameterGroups: []
timestamp: Jan 14, 2021, 7:52:35 PM
component: f7-card
config:
title: Test
Questions:
- What
props-parameters-type’s are possible? - Are hidden
props-parameterspossible? - Is
timestamprequired? - Which F7
component’s could be used as base component? - Which properties (e.g.
title,style) of the base component could be set?
In the follow up the widget seams to consist of other components. They could in some way nested. Is somewhere the concept of slots explained?
I do found some example widgets:
- https:/github.com/rgrollfitz/oh3-widgets/
- https:/community.openhab.org/t/create-a-simple-thermostat-widget-in-oh3/113553
- https:/community.openhab.org/t/wiki-building-pages-in-the-oh3-ui-documentation-draft-2-3/104392
- https:/community.openhab.org/t/openhab-3-0-my-getting-started-notes-model-and-pages/107204
- …
But even with them, I do NOT get it. There seams to be a Label component. Why not ‘f7-label’ or ‘oh-label’. Other components do start with oh-? Which of them are available?
Sorry about this many questions! But maybe others can profit.
Any hints are welcome! Thanks in advance!
Achim