import asyncio
import logging

_LOGGER = logging.getLogger(__name__)


async def restart_sensor_service():
    try:
        cmd = asyncio.create_subprocess_exec('systemctl', 'restart', 'sensor.service')
        proc = await cmd
        await proc.wait()
        return True
    except Exception as e:
        _LOGGER.exception("Failed to restart service: %s", e)
        return False

@@ -198,59 +198,345 @@
 ice'
-)%0A        proc = await cmd%0A        await proc.wait(
+,%0A                                             stdout=asyncio.subprocess.PIPE,%0A                                             stderr=asyncio.subprocess.PIPE)%0A        proc = await cmd%0A        stdout_data, stderr_data = await proc.communicate()%0A        _LOGGER.debug(%22stdout: %25s%22, stdout_data)%0A        _LOGGER.debug(%22stderr: %25s%22, stderr_data
 )%0A  

Add better logging to utils