From 9be0c3125dd5302c409b6a0fe37b8224b163209f Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 24 Feb 2024 02:03:28 +0300 Subject: temphum_mqtt_node: use correct data topic --- bin/temphum_mqtt_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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__': -- cgit v1.2.3