Using Unique IDs with MQTT Autodiscovery and multiple values per sensor

I’m currently designing a sensor that measures and reports the volume of liquid left in a tank alongside the starting size of the tank. I’m trying to get it to work with autodiscovery, but Home Assistant doesn’t report both values if I include a unique ID, and gives me an error about not having a unique ID if I don’t.

Currently, my autodiscovery notifications look like the following when I include a unique ID:

#1 for Size:

{
   "unit_of_meas":"mL",
   "name":"Tank F1ED72 - Port 1 Remaining",
   "uniq_id":"tank_F1ED72_port_1_remaining",
   "stat_t":"tanksensor/tank_F1ED72_port_1",
   "val_tpl":"{{value_json.Remaining}}"
}

#2 for Remaining:

{
   "unit_of_meas":"mL",
   "name":"Tank F1ED72 - Port 1 Tank Size",
   "uniq_id":"tank_F1ED72_port_1_tanksize",
   "stat_t":"tanksensor/tank_F1ED72_port_1",
   "val_tpl":"{{value_json.TankSize}}"
}

…and the message itself looks like the following:

{
   "unit_of_meas":"mL",
   "Tank":"F1ED72",
   "Port":1,
   "Remaining":9464,
   "TankSize":18927
}

…with a topic of tanksensor/tank_F1ED72_port_1

Does anyone see anything I’m doing wrong with the above? Am I missing something?

Does anyone out there have any ideas for this? I’m still stumped, unfortunately. :frowning:

I’m trying to do something very similar, and Google led me here. Surely there’s a solution?