summaryrefslogtreecommitdiff
path: root/bin/temphum_mqtt_node.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/temphum_mqtt_node.py')
-rwxr-xr-xbin/temphum_mqtt_node.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/temphum_mqtt_node.py b/bin/temphum_mqtt_node.py
index 4259f65..3f1c911 100755
--- a/bin/temphum_mqtt_node.py
+++ b/bin/temphum_mqtt_node.py
@@ -9,7 +9,7 @@ from typing import Optional
from argparse import ArgumentParser
from homekit.config import config
from homekit.mqtt import MqttNodesConfig, MqttNode, MqttWrapper
-from homekit.mqtt.module.temphum import MqttTempHumModule, MqttTemphumDataPayload
+from homekit.mqtt.module.temphum import MqttTempHumModule, MqttTemphumDataPayload, DATA_TOPIC
from homekit.temphum import SensorType, BaseSensor
from homekit.temphum.i2c import create_sensor
@@ -53,7 +53,7 @@ async def on_sched_task():
rh, temp = await get_measurements()
payload = MqttTemphumDataPayload(temp=temp, rh=rh)
- _mqtt_node.publish('data', payload.pack())
+ _mqtt_node.publish(DATA_TOPIC, payload.pack())
if __name__ == '__main__':