Allow pipes in command sensors and services

This commit is contained in:
Paulus Schoutsen 2015-10-24 12:40:36 -07:00
parent e461ceae36
commit 96181a555a
3 changed files with 3 additions and 3 deletions

View file

@ -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)