mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Reduce logging in command_line (#123723)
This commit is contained in:
parent
21987a67e7
commit
a4f0234841
@ -110,7 +110,7 @@ class CommandCover(ManualTriggerEntity, CoverEntity):
|
||||
|
||||
async def _async_move_cover(self, command: str) -> bool:
|
||||
"""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)
|
||||
success = returncode == 0
|
||||
@ -140,7 +140,7 @@ class CommandCover(ManualTriggerEntity, CoverEntity):
|
||||
async def _async_query_state(self) -> str | None:
|
||||
"""Query for the 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 None
|
||||
|
||||
|
@ -111,7 +111,7 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity):
|
||||
|
||||
async def _switch(self, command: str) -> bool:
|
||||
"""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
|
||||
|
||||
@ -122,12 +122,12 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity):
|
||||
|
||||
async def _async_query_state_value(self, command: str) -> str | None:
|
||||
"""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)
|
||||
|
||||
async def _async_query_state_code(self, command: str) -> bool:
|
||||
"""Execute state command for return code."""
|
||||
LOGGER.info("Running state code command: %s", command)
|
||||
LOGGER.debug("Running state code command: %s", command)
|
||||
return (
|
||||
await async_call_shell_with_timeout(
|
||||
command, self._timeout, log_return_code=False
|
||||
|
Loading…
x
Reference in New Issue
Block a user