From 1dad41cbc42d958dba5b1e0b242ad23755b806dc Mon Sep 17 00:00:00 2001 From: zewelor Date: Wed, 19 Dec 2018 11:53:44 +0100 Subject: [PATCH] Revert wrong topic_prefix handling --- workers/thermostat.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workers/thermostat.py b/workers/thermostat.py index 1023a42..52ea74f 100644 --- a/workers/thermostat.py +++ b/workers/thermostat.py @@ -71,8 +71,7 @@ class ThermostatWorker(BaseWorker): return ret def on_command(self, topic, value): - if self.topic_prefix: - _, device_name, method, _ = topic[len(self.topic_prefix+"/"):].split('/') + _, device_name, method, _ = topic.split('/') thermostat = self.devices[device_name]