Hello, I see significant progress with the widgets in the main UI interface, and I’ve been considering integrating the timeline picker into the main UI as a widget for quite some time now. But the YAML concept makes this impossible.
The integration with a webview card is a possible workaround but native would a be much better.
Is there in the meantime a native way to create widgets with html, css and js?
I see the usefulness of a timeline picker control that could be built into openhab (i.e. a oh-timeline component) and think that would be a good way to proceed. Is there where a lot of the custom js scripting is needed?
Yes and no. Here you can see some of the possibilities and how arbitrary html works in the yaml system:
The main caveat there is that, if you are on the newest snapshots then the CSP has been updated and inline scripts are now blocked, although source scripts in $CONF/html are still allowed. There are, of course, ways to restructure to move all inline scripts to files so it is still possible.
I think your best bet, for something like this, would be to translate this into a custom html element. Then, as you can see in the example above with the model-viewer custom element, you just need to import the script and can use the yaml system to instantiate and configure the custom element pretty easily. That would probably also make it easier to officially incorporate it into MainUI.