I am currently in the process of creating an Overview page and have noticed that I can add various types of cards as blocks or columns. Is it possible to include a ‘Location card’ similar to those that are automatically generated by the framework from my model? According to this topic, this functionality is either not possible or difficult to achieve in OH3. Is the situation different in OH4?
I would like to implement something similar to what @Phf has done, but as a beginner, I am unsure where to input the provided widget code. Could someone please provide some guidance?
Below is an illustration of my model tree:
Thank you in advance,
Platform information:
Hardware: Linux 5.19.0-42-generic, x86_64, 16 GB RAM
If you’re on the most recent release, you should be able to add a location tab as part of a custom tabbed page. I do not think you can add a functional card on it’s own yet (a oh-location-card does show up as an option in the autocomplete list of page and widget editors, but there’s no way to configure it outside of the location tab parent component). I also don’t think any of this has been added to the documentation yet.
That is just custom widget code. You need add a new widget (Developer Tools → Widgets → Big Blue + button) and paste the code into the editor window that opens. When you save the code from that window the widget will then be available for you to add in pages and other widgets.