Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@MODE.setter
def MODE(self, setmode):
""" Set mode. """
if setmode == self.BOOST_MODE:
self.actionNodeData('BOOST_MODE', True)
elif setmode in [self.AUTO_MODE, self.MANU_MODE]:
if self.getAttributeData("BOOST_MODE"):
self.actionNodeData('BOOST_MODE', False)
self.actionNodeData('CONTROL_MODE', setmode)
def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)
self.actionNodeData('CONTROL_MODE', self.MANU_MODE)
class IPThermostatWall2(HMThermostat, IPAreaThermostat, HelperRssiDevice, HelperLowBatIP):
"""
HmIP-WTH, HmIP-WTH-2
ClimateControl-Wall Thermostat that measures temperature and allows to set a target temperature or use some automatic mode.
"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)
# init metadata
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1],
"HUMIDITY": [1]})
self.WRITENODE.update({"SET_POINT_TEMPERATURE": [1]})
self.ACTIONNODE.update({"AUTO_MODE": [1],
"MANU_MODE": [1],
"CONTROL_MODE": [1],
"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"LOW_BAT": [0],
@MODE.setter
def MODE(self, setmode):
""" Set mode. """
if setmode == self.BOOST_MODE:
self.actionNodeData('BOOST_MODE', True)
elif setmode in [self.AUTO_MODE, self.MANU_MODE]:
if self.getAttributeData("BOOST_MODE"):
self.actionNodeData('BOOST_MODE', False)
self.actionNodeData('CONTROL_MODE', setmode)
def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)
self.actionNodeData('CONTROL_MODE', self.MANU_MODE)
class IPThermostatWall(HMThermostat, IPAreaThermostat, HelperRssiDevice, HelperLowBatIP):
"""
HmIP-STHD
ClimateControl-Wall Thermostat that measures temperature and allows to set a target temperature or use some automatic mode.
"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)
# init metadata
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1],
"HUMIDITY": [1]})
self.WRITENODE.update({"SET_POINT_TEMPERATURE": [1]})
self.ACTIONNODE.update({"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"LOW_BAT": [0],
"OPERATING_VOLTAGE": [0],
"SET_POINT_MODE": [1],
"BOOST_MODE": [1]})
Be aware that standard HM devices have a reversed understanding of PEER
and DEVICE compared to HMIP devices."""
class SensorHm(HMSensor, HelperRssiDevice, HelperRssiPeer, HelperLowBat):
"""Homematic sensors always have
- strength of the signal received by the device (HelperRssiDevice).
Be aware that standard HM devices have a reversed understanding of PEER
and DEVICE compared to HMIP devices.
- strength of the signal received by the CCU (HelperRssiPeer).
Be aware that standard HM devices have a reversed understanding of PEER
and DEVICE compared to HMIP devices.
- low battery status (HelperLowBat)"""
class SensorHmIP(HMSensor, HelperRssiDevice, HelperLowBatIP, HelperOperatingVoltageIP):
"""Homematic IP sensors always have
- strength of the signal received by the CCU (HelperRssiDevice).
Be aware that HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- strength of the signal received by the device (HelperRssiPeer).
Be aware that standard HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- low battery status (HelperLowBatIP)
- voltage of the batteries (HelperOperatingVoltageIP)"""
class SensorHmIPNoVoltage(HMSensor, HelperRssiDevice, HelperLowBatIP):
"""Some Homematic IP sensors have
- strength of the signal received by the CCU (HelperRssiDevice).
Be aware that HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
"""
BC-TC-C-WM-4
ClimateControl-Wall Thermostat that measures temperature and allows to set a target temperature or use some automatic mode.
"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)
# init metadata
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1]})
self.WRITENODE.update({"SET_TEMPERATURE": [1]})
self.ACTIONNODE.update({"AUTO_MODE": [1],
"MANU_MODE": [1],
"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"CONTROL_MODE": [1]})
class IPThermostat(HMThermostat, HelperRssiDevice, HelperLowBatIP, HelperValveState):
"""
HPIM-eTRV
ClimateControl-Radiator Thermostat that measures temperature and allows to set a target temperature or use some automatic mode.
"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)
# init metadata
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1]})
self.WRITENODE.update({"SET_POINT_TEMPERATURE": [1],
"WINDOW_STATE": [1]})
self.ACTIONNODE.update({"AUTO_MODE": [1],
"MANU_MODE": [1],
"CONTROL_MODE": [1],
"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"LOW_BAT": [0],
- low battery status (HelperLowBat)"""
class SensorHmIP(HMSensor, HelperRssiDevice, HelperLowBatIP, HelperOperatingVoltageIP):
"""Homematic IP sensors always have
- strength of the signal received by the CCU (HelperRssiDevice).
Be aware that HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- strength of the signal received by the device (HelperRssiPeer).
Be aware that standard HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- low battery status (HelperLowBatIP)
- voltage of the batteries (HelperOperatingVoltageIP)"""
class SensorHmIPNoVoltage(HMSensor, HelperRssiDevice, HelperLowBatIP):
"""Some Homematic IP sensors have
- strength of the signal received by the CCU (HelperRssiDevice).
Be aware that HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- strength of the signal received by the device (HelperRssiPeer).
Be aware that standard HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- low battery status (HelperLowBatIP)
- but no voltage of batteries"""
class SensorHmIPNoBattery(HMSensor, HelperRssiDevice):
"""Some Homematic IP sensors have
- strength of the signal received by the CCU (HelperRssiDevice).
Be aware that HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.