Filling sensor from command line with multiple outputs

Hi everyone,

I’m trying to fill two sensors for reading the ink levels of my printer. I have a command I can run on a remote IP address. By using remote ssh, it’s possible to run this on my local Home Assistant docker with an automation. The output however is as follows:

Canon MG3600 series

Black:                                 100%
Color:                                 100%

Is there any way I can get the levels for black and color each into a separate sensor? I’ve been trying to get these numbers into a json or something, but I can’t seem to get my head wrapped around it.

I know there’s an ink custom component, but you need the ink application installed on your local HA installation and that’s not possible, becuase of the docker instance I’m using.

Any ideas how I can accomplish this?

Run the app elsewhere and use MQTT to get the sensor values into HA.