add heating profiles

This commit is contained in:
robert 2021-12-20 19:39:17 +01:00
parent 363c03ffa2
commit 6679f2b22b

View File

@ -6,7 +6,7 @@ import os
import homematicip
from homematicip.home import Home
from homematicip.device import ShutterContact,HeatingThermostat,PlugableSwitchMeasuring,WallMountedThermostatPro
from homematicip.group import HeatingCoolingProfile,HeatingGroup
# Import MQTT client.
import paho.mqtt.publish as publish
import paho.mqtt.client as paho
@ -67,10 +67,31 @@ def write_wallmountedthermostatpro(room,device):
print({"Room":room, "Device Name":device.label, "Last Status Update" : device.lastStatusUpdate, "Actual Temperature":device.actualTemperature, "Set Point Temperature":device.setPointTemperature,"Humidity":device.humidity})
def heating_profile(group):
#heatingGroup=homematicip.group.HeatingGroup(group)
#heatingGroup.__init__(home)
print("Heating Profiles")
print("Group Label: " + group.label)
print("Group Type: " + group.groupType)
print("Active Heating Profile: " + group.activeProfile.name)
for profile in group.profiles:
if profile.name != "":
print("Group Profile Name: " + profile.name)
#print("Profile ID: " + profile.id)
#print("Profile Index: " + profile.index)
if profile.name == "Home Office":
print("Profile Index" + profile.index)
print(group)
heatingGroup=HeatingGroup(group)
# print(heatingGroup.profiles[0])
group.set_active_profile(profile.index)
def main():
global home
home.get_current_state()
for group in home.groups:
# if group.groupType=="HEATING":
# heating_profile(group)
if group.groupType=="META":
for device in group.devices:
if isinstance(device,ShutterContact):