summaryrefslogtreecommitdiff
path: root/bin/temphum_mqtt_node.py
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2024-02-24 02:03:28 +0300
committerEvgeny Zinoviev <me@ch1p.io>2024-02-24 02:03:28 +0300
commit9be0c3125dd5302c409b6a0fe37b8224b163209f (patch)
treee66100c47bc17ef10e089ca86cc77310e7e44083 /bin/temphum_mqtt_node.py
parentc9b351a08e31aa0c34892065f02f9ef710b6cd34 (diff)
temphum_mqtt_node: use correct data topic
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__':