remove change heating profile from readHomematicIP.py

This commit is contained in:
Robert Borzutzki 2022-01-03 08:56:15 +01:00
parent 51859d05ef
commit 8ea93b3f31
2 changed files with 9 additions and 25 deletions

View File

@ -27,7 +27,9 @@ home.init(config.access_point)
topic = 'weathersensors/' topic = 'weathersensors/'
room = 'Leonie' room = 'Leonie'
client.subscribe(topic + room + "/setHeatingProfile") #client.subscribe(topic + room + "/setHeatingProfile")
client.subscribe(topic + room + "/activeProfile")
def on_message(client, userdata, msg): # The callback for when a PUBLISH message is received from the server. def on_message(client, userdata, msg): # The callback for when a PUBLISH message is received from the server.
@ -40,14 +42,15 @@ def on_message(client, userdata, msg): # The callback for when a PUBLISH messag
if profile.name != "": if profile.name != "":
client.publish(topic + room + "/activeProfile", group.activeProfile.name) client.publish(topic + room + "/activeProfile", group.activeProfile.name)
client.publish(topic + room + "/heatingProfiles/" + profile.index, profile.name) client.publish(topic + room + "/heatingProfiles/" + profile.index, profile.name)
print(profile.index + ": " + profile.name) #print(profile.index + ": " + profile.name)
print(profile.name) #print(profile.name)
print(msg.payload.decode("utf-8")) #print(msg.payload.decode("utf-8"))
if profile.name == msg.payload.decode("utf-8"): if profile.name == msg.payload.decode("utf-8"):
print("msg: " + msg.payload.decode("utf-8"))
print("Profile Index: " + profile.index) print("Profile Index: " + profile.index)
print(group) #print(group)
group.set_active_profile(profile.index) group.set_active_profile(profile.index)
print("%s %s" % (msg.topic, msg.payload.decode("utf-8"))) #print("%s %s" % (msg.topic, msg.payload.decode("utf-8")))
def heating_profile(group): def heating_profile(group):

View File

@ -45,25 +45,6 @@ def write_wallmountedthermostatpro(room, device):
"Humidity": device.humidity}) "Humidity": device.humidity})
def heating_profile(group):
print("Room: " + group.label)
room = group.label
topic = 'weathersensors/' + room
print("Active Heating Profile: " + group.activeProfile.name)
for profile in group.profiles:
if profile.name != "":
client.publish(topic + "/availability", "ON")
client.publish(topic + "/activeProfile", group.activeProfile.name)
client.publish(topic + "/heatingProfiles/" + profile.index, profile.name)
print(profile.index + ": " + profile.name)
if profile.name == "Normal":
# print("Profile Index" + profile.index)
# print(group)
group.set_active_profile(profile.index)
def main(): def main():
global home global home
home.get_current_state() home.get_current_state()