Use Semantic Property in widgets

In the default Location page, which is generated based on Semantic Property/Class/Location, a nice view is displayed of the amount of lights which are one (+ temperature, humidity…).
image

I’m creating my own widgets and and I also want to display the number of lights of a specific location. Is it possible to count all Property_Light items from a specific Location in a widget directly? Or do I need to do this with groups?

You will need to do this with groups. Many of those features in the overviews tabs are special coded abilities of the UI and not available in custom widget definitions.