Man haette keine aeltere Version nutzen sollen

This commit is contained in:
lukario 2021-04-18 12:25:32 +02:00
parent 1834211e89
commit 2ae081198f

View File

@ -34,9 +34,9 @@ def on_connect(client, userdata, flags, rc):
for i in zimmer:
client.subscribe("zimmer/" + i.name + "/heizung/homeassistant/automatic")
client.subscribe("zimmer/" + i.name + "/heizung/homeassistant/temperatur")
client.subscribe("zimmer/" + i.name + "/heizung/homeassistant/status")
client.subscribe("zimmer/" + i.name + "/heizung/control/automatic")
client.subscribe("zimmer/" + i.name + "/heizung/control/temperatur")
client.subscribe("zimmer/" + i.name + "/heizung/control/status")
client.subscribe("zimmer/" + i.name + "/heizung/temperatur")
client.subscribe("zimmer/" + i.name + "/heizung/status")
# client.subscribe("zimmer/" + i.name + "/sensoren/tuer/status")
@ -57,7 +57,7 @@ def on_message(client, userdata, message):
log.debug('received message: %s from %s', format(msg), format(message.topic))
if message.topic.split("/", -1)[2] == "heizung":
if message.topic.split("/", -1)[3] == "homeassistant":
if message.topic.split("/", -1)[3] == "control":
if message.topic.split("/", -1)[4] == "automatic":
for i in zimmer:
if message.topic.split("/", -1)[1] == i.name:
@ -80,7 +80,7 @@ def sendReadings():
if i.automatic:
client.publish("zimmer/" + i.name + "/heizung/temperatur", i.temperaturSet, qos=1, retain=True)
client.publish("zimmer/" + i.name + "/heizung/homeassistant/status", i.statusActual, qos=1, retain=True)
client.publish("zimmer/" + i.name + "/heizung/control/status", i.statusActual, qos=1, retain=True)
log.debug('sent readings')