Advice on adding json attributes to Proxmox VE integration

I am trying to make a contribution to the Proxmox VE core integration to add disk (local, zfs) data that is currently not being captured by the integration and I have a design question regarding how to make the data available in HA.

When you add an Proxmox VE integration today, you get a Node type service for each node (physical server) you have in proxmox. That service adds a bunch of entities (status, cpu/disk usages).

My idea is to add an entity called disks under each node. My question is about having the disk entity be a json object, since there could be lots of different types of disks mounted to the node. My question is what would be the best approach:

  1. Keep a single disks entity under the node service as a json object. This way the data would have to be handled with templates to be properly displayed in the UI, if the end user wants to display specific attributes, like the storage use for a single disk.

  2. Have the integration scan through all disk elements returned by the API, then create a bunch of entities like:
    sensor.proxmox_disk1_size
    sensor.proxmox_disk1_used
    sensor.proxmox_disk1_mount_point
    sensor.proxmox_disk2_size
    sensor.proxmox_disk2_used
    sensor.proxmox_disk2_mount_point

Thanks,

With json object I assume you mean adding it somewhere as an attribute.

I think entities are preferred. They are easier to find and work with for users. As an example battery attributes are deprecated and being moved to battery entities.