Reduce logging in command_line (#123723)

This commit is contained in:
G Johansson 2024-08-12 20:42:39 +02:00 committed by GitHub
parent 21987a67e7
commit a4f0234841
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -110,7 +110,7 @@ class CommandCover(ManualTriggerEntity, CoverEntity):
async def _async_move_cover(self, command: str) -> bool: async def _async_move_cover(self, command: str) -> bool:
"""Execute the actual commands.""" """Execute the actual commands."""
LOGGER.info("Running command: %s", command) LOGGER.debug("Running command: %s", command)
returncode = await async_call_shell_with_timeout(command, self._timeout) returncode = await async_call_shell_with_timeout(command, self._timeout)
success = returncode == 0 success = returncode == 0
@ -140,7 +140,7 @@ class CommandCover(ManualTriggerEntity, CoverEntity):
async def _async_query_state(self) -> str | None: async def _async_query_state(self) -> str | None:
"""Query for the state.""" """Query for the state."""
if self._command_state: if self._command_state:
LOGGER.info("Running state value command: %s", self._command_state) LOGGER.debug("Running state value command: %s", self._command_state)
return await async_check_output_or_log(self._command_state, self._timeout) return await async_check_output_or_log(self._command_state, self._timeout)
return None return None

View File

@ -111,7 +111,7 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity):
async def _switch(self, command: str) -> bool: async def _switch(self, command: str) -> bool:
"""Execute the actual commands.""" """Execute the actual commands."""
LOGGER.info("Running command: %s", command) LOGGER.debug("Running command: %s", command)
success = await async_call_shell_with_timeout(command, self._timeout) == 0 success = await async_call_shell_with_timeout(command, self._timeout) == 0
@ -122,12 +122,12 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity):
async def _async_query_state_value(self, command: str) -> str | None: async def _async_query_state_value(self, command: str) -> str | None:
"""Execute state command for return value.""" """Execute state command for return value."""
LOGGER.info("Running state value command: %s", command) LOGGER.debug("Running state value command: %s", command)
return await async_check_output_or_log(command, self._timeout) return await async_check_output_or_log(command, self._timeout)
async def _async_query_state_code(self, command: str) -> bool: async def _async_query_state_code(self, command: str) -> bool:
"""Execute state command for return code.""" """Execute state command for return code."""
LOGGER.info("Running state code command: %s", command) LOGGER.debug("Running state code command: %s", command)
return ( return (
await async_call_shell_with_timeout( await async_call_shell_with_timeout(
command, self._timeout, log_return_code=False command, self._timeout, log_return_code=False