Allow pipes in command sensors and services
This commit is contained in:
parent
e461ceae36
commit
96181a555a
3 changed files with 3 additions and 3 deletions
|
@ -98,7 +98,7 @@ class CommandSensorData(object):
|
|||
_LOGGER.info('Running command: %s', self.command)
|
||||
|
||||
try:
|
||||
return_value = subprocess.check_output(self.command.split())
|
||||
return_value = subprocess.check_output(self.command, shell=True)
|
||||
self.value = return_value.strip().decode('utf-8')
|
||||
except subprocess.CalledProcessError:
|
||||
_LOGGER.error('Command failed: %s', self.command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue