summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/sensors_mqtt_receiver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sensors_mqtt_receiver.py b/src/sensors_mqtt_receiver.py
index 99b6af2..ead28db 100755
--- a/src/sensors_mqtt_receiver.py
+++ b/src/sensors_mqtt_receiver.py
@@ -24,12 +24,12 @@ class MQTTServer(MQTTBase):
def on_connect(self, client: mqtt.Client, userdata, flags, rc):
super().on_connect(client, userdata, flags, rc)
self._logger.info("subscribing to home/#")
- client.subscribe('home/#', qos=1)
+ client.subscribe('hk/#', qos=1)
def on_message(self, client: mqtt.Client, userdata, msg):
try:
variants = '|'.join([s.name.lower() for s in TemperatureSensorLocation])
- match = re.match(rf'(?:home|hk)/(\d+)/si7021/({variants})', msg.topic)
+ match = re.match(rf'hk/(\d+)/si7021/({variants})', msg.topic)
if not match:
return