add publish heating profiles

This commit is contained in:
robert 2021-12-20 21:51:45 +01:00
parent a9a879dc7c
commit 5118791779

View File

@ -46,22 +46,21 @@ def write_wallmountedthermostatpro(room, device):
def heating_profile(group): def heating_profile(group):
print(group) print("Room: " + group.label)
topic = 'heatingProfiles/' room = group.label
# heatingGroup=homematicip.group.HeatingGroup(group) topic = 'weathersensors/' + room
# heatingGroup.__init__(home)
print("Heating Profiles")
print("Group Label: " + group.label)
print("Group Type: " + group.groupType)
print("Active Heating Profile: " + group.activeProfile.name) print("Active Heating Profile: " + group.activeProfile.name)
for profile in group.profiles: for profile in group.profiles:
if profile.name != "": if profile.name != "":
print("Group Profile Name: " + profile.name) client.publish(topic + "/availability", "ON")
# print("Profile ID: " + profile.id) client.publish(topic + "/activeProfile", group.activeProfile.name)
# print("Profile Index: " + profile.index) client.publish(topic + "/" + profile.index, profile.name)
print(profile.index + ": " + profile.name)
if profile.name == "Home Office": if profile.name == "Home Office":
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)
@ -69,8 +68,8 @@ def main():
global home global home
home.get_current_state() home.get_current_state()
for group in home.groups: for group in home.groups:
# if group.groupType=="HEATING": if group.groupType=="HEATING":
# heating_profile(group) heating_profile(group)
if group.groupType == "META": if group.groupType == "META":
for device in group.devices: for device in group.devices:
if isinstance(device, ShutterContact): if isinstance(device, ShutterContact):