Command_line sensor + regexp

hi!
I’m trying to create a sensor that shows the disk usage in Linux, there is a utility for this - “iostat”. I wrote a command and checked it in the SSH console:
iostat -m BLOCKDEV sda | grep -oE 'sda\s+(\d\.+\d+)\s+(\d\.+\d+)\s+(\d\.+\d+)' | awk '{print $2}'
It works and gives me a number, for example “3.4”. But if I use the same command in the ‘command_line’ sensor, the value is empty.
My sensor:

command_line:
  - sensor:
      name: IOstat tps
      command: |
        iostat -m  BLOCKDEV sda | grep -oE 'sda\s+(\d\.+\d+)\s+(\d\.+\d+)\s+(\d\.+\d+)' | awk '{print $2}'
      value_template: >-
          {% if value|length %}
            {{ float(value) }}
          {% else %}
            0
          {% endif %}
      unit_of_measurement: KiB/s
      scan_interval: 60

without ‘value_template’ I was getting the error

Error
2023-06-18 13:53:23.679 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform command_line
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 581, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 471, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 749, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 849, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/command_line/sensor.py", line 140, in async_added_to_hass
await self._update_entity_state(None)
File "/usr/src/homeassistant/homeassistant/components/command_line/sensor.py", line 164, in _update_entity_state
await self._async_update()
File "/usr/src/homeassistant/homeassistant/components/command_line/sensor.py", line 202, in _async_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 596, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 585, in state
raise ValueError(
ValueError: Sensor sensor.iostat_read has device class 'None', state class 'None' unit 'MiB/s' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)