From b90dfea62ccc524a5eb0964796595ef4a533aa89 Mon Sep 17 00:00:00 2001 From: Melvin Groenendaal Date: Fri, 15 Nov 2019 12:34:51 +0100 Subject: [PATCH] Only return results, not the command --- custom_components/ssh/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ssh/sensor.py b/custom_components/ssh/sensor.py index 477389c..4874091 100644 --- a/custom_components/ssh/sensor.py +++ b/custom_components/ssh/sensor.py @@ -108,7 +108,7 @@ def update(self): self._ssh.sendline(self._command) self._ssh.prompt() - value = self._ssh.before.decode("utf-8") + value = '\n'.join(self._ssh.before.decode("utf-8").splitlines()[1:]) if self._value_template is not None: self._state = self._value_template.render_with_possible_json_value(