Revert wrong topic_prefix handling
This commit is contained in:
@@ -71,8 +71,7 @@ class ThermostatWorker(BaseWorker):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def on_command(self, topic, value):
|
def on_command(self, topic, value):
|
||||||
if self.topic_prefix:
|
_, device_name, method, _ = topic.split('/')
|
||||||
_, device_name, method, _ = topic[len(self.topic_prefix+"/"):].split('/')
|
|
||||||
|
|
||||||
thermostat = self.devices[device_name]
|
thermostat = self.devices[device_name]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user