Sensor to State Card connection

Just jumping in to HA development, first project. I took an existing sensor (ups.py) and extended it to give more detail on packages being delivered. Currently it just writes the custom/extra info out to the log file so I know it’s working and parsing correctly. So I have all this data, how do I display it ?

Where I am lost is the connection from the backend sensor to the frontend UI. I don’t see how you configure a particular entity to display on a specific state-card. I see some things about developing custom state-cards, which is fine if thats what I need to do, but I would much rather re-use an existing one. Ultimately I just want to display about 3 lines of icon/name/state (like a group), and then I might add a more-detail popup to list all packages in transit. But since it’s so simple, I would prefer to use an existing state-card (or maybe I just need to create my 3 items separately and add them to a group) then develop a custom one.

Any pointers would be appreciated.

Check out some examples that do it today, my recommendation is to add that info as an attribute unless you prefer new sensors all together.

I know the Ring components do this. For example, they will show the Wifi network, firmware, type, etc only when the detail card is opened.

image

To expand on what kylerw said, I would check if the data is an attribute already. Either as he showed below or check your states tab. Any existing state or attribute can be easily displayed in a card using a template sensor.

Do you mean I can just define more properties like this:

@property
    def my_property_a(self):
        """Return the property a of this entity, if any."""
        return my_property['a']

Essentially expose my data this way in the sensor.py file, and then just define these new properties in default_view and treat them like any other sensor ? Would that work ?