Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
0.1.62 (#272)
Browse files Browse the repository at this point in the history
* Bump version

* Remove LOWBAT for WeatherSensor-class, refs #230

* Remove LOWBAT for HM-Sec-SD, refs #230

* Add battery reporting to HMIP-WRC2 (#265)

* Add output support to HMW-IO-12-FM (#269)

* Update class IPThermostatWall230V (#271)

* Update IPThermostatWall230V class

Used class `IPThermostatWall2` as template for `IPThermostatWall230V`. Removed `OPERATING_VOLTAGE`,  `LOW_BAT` and `HelperLowBatIP`.

* Cleanup

* Update changelog
  • Loading branch information
danielperna84 authored Dec 4, 2019
1 parent e3a6fa9 commit 2bf049d
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 10 deletions.
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 0.1.62 (2019-12-04)
- Remove `LOWBAT` for some devices (#230) @danielperna84
- Add battery reporting for `HMIP-WRC2` @pg5
- Add output-support for `HMW-IO-12-FM` (#269) @Lokla
- Add action-nodes for `HmIP-BWTH`, `HmIP-BWTH24` (#270) @dickesW

Version 0.1.61 (2019-10-13)
- Fix device storage @danielperna84
- Add battery attribute for BC-PB-2-WM @danielperna84
Expand Down
11 changes: 11 additions & 0 deletions pyhomematic/devicetypes/actors.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,20 @@ class IOSwitch(GenericSwitch, HelperWorking, HelperEventRemote, HelperWired):
Switch turning attached device on or off.
"""

def __init__(self, device_description, proxy, resolveparamsets=False):
self._doc = []
super().__init__(device_description, proxy, resolveparamsets)
if "HMW-IO-12-FM" in self.TYPE:
for chan in range(1, 13):
if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER").get("BEHAVIOUR", None) == 1:
self._doc.append(chan)

@property
def ELEMENT(self):
if "HMW-IO-12-Sw7-DR" in self.TYPE:
return [13, 14, 15, 16, 17, 18, 19]
if "HMW-IO-12-FM" in self.TYPE:
return self._doc
if "HMW-LC-Sw2-DR" in self.TYPE:
return [3, 4]
return [1]
Expand Down Expand Up @@ -790,6 +800,7 @@ def turn_off_effect(self):
"HM-ES-PMSwX": SwitchPowermeter,
"HMW-IO-12-Sw7-DR": IOSwitch,
"HMW-IO-12-Sw14-DR": HMWIOSwitch,
"HMW-IO-12-FM": IOSwitch,
"HMW-LC-Sw2-DR": IOSwitch,
"HMW-LC-Bl1-DR": KeyBlind,
"HMW-LC-Bl1-DR-2": KeyBlind,
Expand Down
7 changes: 2 additions & 5 deletions pyhomematic/devicetypes/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ def ELEMENT(self):
return list(range(1, 20))
if "HMW-IO-4-FM" in self.TYPE:
return [1, 2, 3, 4]
if "HMW-IO-12-FM" in self.TYPE:
return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
if "HmIP-RC8" in self.TYPE:
return [1, 2, 3, 4, 5, 6, 7, 8]
return [1]
Expand Down Expand Up @@ -136,9 +134,8 @@ def ELEMENT(self):
"HM-PB-4Dis-WM": Remote,
"HM-PB-4Dis-WM-2": Remote,
"HMW-IO-4-FM": Remote,
"HMW-IO-12-FM": Remote,
"HMIP-WRC2": Remote,
"HmIP-WRC2": Remote,
"HMIP-WRC2": RemoteBatteryIP,
"HmIP-WRC2": RemoteBatteryIP,
"HmIP-BRC2": Remote,
"HmIP-WRC6": RemoteBatteryIP,
"HmIP-KRCA": Remote,
Expand Down
4 changes: 4 additions & 0 deletions pyhomematic/devicetypes/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def get_power(self, channel=None):
class Smoke(SensorHm, HelperBinaryState):
"""Smoke alarm.
This is a binary sensor."""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)
del self.ATTRIBUTENODE["LOWBAT"]

def is_smoke(self, channel=None):
""" Return True if smoke is detected """
Expand Down Expand Up @@ -593,6 +596,7 @@ def __init__(self, device_description, proxy, resolveparamsets=False):
"SUNSHINEDURATION": self.ELEMENT,
"BRIGHTNESS": self.ELEMENT})
self.BINARYNODE.update({"RAINING": self.ELEMENT})
del self.ATTRIBUTENODE["LOWBAT"]

def get_temperature(self, channel=None):
return float(self.getSensorData("TEMPERATURE", channel))
Expand Down
30 changes: 26 additions & 4 deletions pyhomematic/devicetypes/thermostats.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)

class IPThermostatWall230V(HMThermostat):
class IPThermostatWall230V(HMThermostat, IPAreaThermostat):
"""
HmIP-BWTH
HmIP-BWTH, HmIP-BWTH24
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):
Expand All @@ -317,8 +317,12 @@ def __init__(self, device_description, proxy, resolveparamsets=False):
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1],
"HUMIDITY": [1]})
self.WRITENODE.update({"SET_POINT_TEMPERATURE": [1]})
self.ACTIONNODE.update({"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"SET_POINT_MODE": [1]})
self.ACTIONNODE.update({"AUTO_MODE": [1],
"MANU_MODE": [1],
"CONTROL_MODE": [1],
"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"SET_POINT_MODE": [1],
"BOOST_MODE": [1]})

def get_set_temperature(self):
""" Returns the current target temperature. """
Expand All @@ -333,6 +337,24 @@ def set_temperature(self, target_temperature):
return False
self.writeNodeData("SET_POINT_TEMPERATURE", target_temperature)

@property
def MODE(self):
""" Return mode. """
if self.getAttributeData("BOOST_MODE"):
return self.BOOST_MODE
else:
return self.getAttributeData("SET_POINT_MODE")

@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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def readme():

PACKAGE_NAME = 'pyhomematic'
HERE = os.path.abspath(os.path.dirname(__file__))
VERSION = '0.1.61'
VERSION = '0.1.62'

PACKAGES = find_packages(exclude=['tests', 'tests.*', 'dist', 'build'])

Expand Down

0 comments on commit 2bf049d

Please sign in to comment.