command: can be a template (docs). I was just being lazy in my test.
You might be able to use json_attributes_path and json_attributes to pull the info into attributes in this sensor, then read that into template sensors with units of measurement to get around the need to call the API multiple times.