Skip to content

Commit

Permalink
added HMIP-WTH-B
Browse files Browse the repository at this point in the history
closes #286
  • Loading branch information
coreGreenberet committed Jan 14, 2020
1 parent 0eceb86 commit 95c9932
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
- Devices
- [HMIP-WTH-B] (Wall Thermostat Basic)

## [0.10.15] 2019-12-30
### Added
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Homematic IP Devices:
- [ ] HMIP-WT (Wall Mounted Thermostat without adjusting wheel)
- [X] HMIP-WTH (Wall Mounted Thermostat Pro with Display)
- [X] HMIP-WTH-2 (Wall Mounted Thermostat Pro with Display) New Version
- [ ] HMIP-WTH-B (Wall Mounted Thermostat basic without adjusting wheel)
- [X] HMIP-WTH-B (Wall Mounted Thermostat basic without adjusting wheel)

Homematic IP Wired Devices:
---------------------------
Expand Down
1 change: 1 addition & 0 deletions homematicip/aio/class_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
DeviceType.TEMPERATURE_HUMIDITY_SENSOR_DISPLAY: AsyncTemperatureHumiditySensorDisplay,
DeviceType.TEMPERATURE_HUMIDITY_SENSOR_OUTDOOR: AsyncTemperatureHumiditySensorOutdoor,
DeviceType.TORMATIC_MODULE: AsyncGarageDoorModuleTormatic,
DeviceType.WALL_MOUNTED_THERMOSTAT_BASIC_HUMIDITY: AsyncWallMountedThermostatBasicHumidity,
DeviceType.WALL_MOUNTED_THERMOSTAT_PRO: AsyncWallMountedThermostatPro,
DeviceType.WATER_SENSOR: AsyncWaterSensor,
DeviceType.WEATHER_SENSOR: AsyncWeatherSensor,
Expand Down
3 changes: 3 additions & 0 deletions homematicip/aio/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ class AsyncWallMountedThermostatPro(

pass

class AsyncWallMountedThermostatBasicHumidity(AsyncWallMountedThermostatPro):
""" HMIP-WTH-B (Wall Thermostat – basic)"""
pass

class AsyncSmokeDetector(SmokeDetector, AsyncDevice):
""" HMIP-SWSD (Smoke Alarm with Q label) """
Expand Down
1 change: 1 addition & 0 deletions homematicip/base/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class DeviceType(AutoNameEnum):
TEMPERATURE_HUMIDITY_SENSOR_DISPLAY = auto()
TEMPERATURE_HUMIDITY_SENSOR_OUTDOOR = auto()
TORMATIC_MODULE = auto()
WALL_MOUNTED_THERMOSTAT_BASIC_HUMIDITY = auto()
WALL_MOUNTED_THERMOSTAT_PRO = auto()
WATER_SENSOR = auto()
WEATHER_SENSOR = auto()
Expand Down
1 change: 1 addition & 0 deletions homematicip/class_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
DeviceType.TEMPERATURE_HUMIDITY_SENSOR_OUTDOOR: TemperatureHumiditySensorOutdoor,
DeviceType.TORMATIC_MODULE: GarageDoorModuleTormatic,
DeviceType.WALL_MOUNTED_THERMOSTAT_PRO: WallMountedThermostatPro,
DeviceType.WALL_MOUNTED_THERMOSTAT_BASIC_HUMIDITY: WallMountedThermostatBasicHumidity,
DeviceType.WATER_SENSOR: WaterSensor,
DeviceType.WEATHER_SENSOR: WeatherSensor,
DeviceType.WEATHER_SENSOR_PLUS: WeatherSensorPlus,
Expand Down
3 changes: 3 additions & 0 deletions homematicip/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ def from_json(self, js):
self.humidity = c["humidity"]
self.setPointTemperature = c["setPointTemperature"]

class WallMountedThermostatBasicHumidity(WallMountedThermostatPro):
""" HMIP-WTH-B (Wall Thermostat – basic)"""
pass

class SmokeDetector(Device):
""" HMIP-SWSD (Smoke Alarm with Q label) """
Expand Down
67 changes: 67 additions & 0 deletions homematicip_demo/json_data/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,73 @@
}
},
"devices": {
"3014F711000000000000AAA5": {
"availableFirmwareVersion": "0.0.0",
"firmwareVersion": "1.0.12",
"firmwareVersionInteger": 65548,
"functionalChannels": {
"0": {
"coProFaulty": false,
"coProRestartNeeded": false,
"coProUpdateFailure": false,
"configPending": false,
"deviceId": "3014F711000000000000AAA5",
"deviceOverheated": false,
"deviceOverloaded": false,
"deviceUndervoltage": false,
"dutyCycle": false,
"functionalChannelType": "DEVICE_OPERATIONLOCK",
"groupIndex": 0,
"groups": [],
"index": 0,
"label": "",
"lowBat": false,
"operationLockActive": false,
"routerModuleEnabled": false,
"routerModuleSupported": false,
"rssiDeviceValue": -58,
"rssiPeerValue": -59,
"supportedOptionalFeatures": {
"3014F7110000000000000002": false,
"IFeatureDeviceCoProRestart": false,
"IFeatureDeviceCoProUpdate": false,
"3014F7110000000000000003": false,
"3014F7110000000000000004": false,
"IFeatureDeviceTemperatureOutOfRange": false,
"IFeatureDeviceUndervoltage": false
},
"temperatureOutOfRange": false,
"unreach": false
},
"1": {
"actualTemperature": 16.0,
"deviceId": "3014F711000000000000AAA5",
"display": "ACTUAL",
"functionalChannelType": "WALL_MOUNTED_THERMOSTAT_PRO_CHANNEL",
"groupIndex": 1,
"groups": [],
"humidity": 42,
"index": 1,
"label": "",
"setPointTemperature": 12.0,
"temperatureOffset": 0.0,
"vaporAmount": 5.710127947243264
}
},
"homeId": "00000000-0000-0000-0000-000000000001",
"id": "3014F711000000000000AAA5",
"label": "Thermostat Schlafen Tal",
"lastStatusUpdate": 1578954498192,
"liveUpdateState": "UP_TO_DATE",
"manufacturerCode": 1,
"modelId": 408,
"modelType": "HmIP-WTH-B",
"oem": "eQ-3",
"permanentlyReachable": true,
"serializedGlobalTradeItemNumber": "3014F711000000000000AAA5",
"type": "WALL_MOUNTED_THERMOSTAT_BASIC_HUMIDITY",
"updateState": "BACKGROUND_UPDATE_NOT_SUPPORTED"
},
"3014F7110000000000ABCD50": {
"availableFirmwareVersion": "1.0.12",
"firmwareVersion": "1.0.12",
Expand Down
14 changes: 14 additions & 0 deletions tests/aio_tests/test_async_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,17 @@ async def test_pluggable_mains_failure(no_ssl_fake_async_home: AsyncHome):
"rssiPeerValue(None) configPending(False) dutyCycle(False) powerMainsFailure(False) "
"genericAlarmSignal(FULL_ALARM)"
)

@pytest.mark.asyncio
async def test_wall_thermostat_basic(no_ssl_fake_async_home: AsyncHome):
d = no_ssl_fake_async_home.search_device_by_id("3014F711000000000000AAA5")

assert d.display == ClimateControlDisplay.ACTUAL
assert d.humidity == 42

assert str(d) == (
"HmIP-WTH-B Thermostat Schlafen Tal lowbat(False) unreach(False) rssiDeviceValue(-58) "
"rssiPeerValue(-59) configPending(False) dutyCycle(False) operationLockActive(False) "
"actualTemperature(16.0) humidity(42) vaporAmount(5.710127947243264) "
"setPointTemperature(12.0)"
)
15 changes: 15 additions & 0 deletions tests/test_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,3 +1215,18 @@ def test_pluggable_mains_failure(fake_home: Home):
"rssiPeerValue(None) configPending(False) dutyCycle(False) powerMainsFailure(False) "
"genericAlarmSignal(FULL_ALARM)"
)


def test_wall_thermostat_basic(fake_home: Home):
with no_ssl_verification():
d = fake_home.search_device_by_id("3014F711000000000000AAA5")

assert d.display == ClimateControlDisplay.ACTUAL
assert d.humidity == 42

assert str(d) == (
"HmIP-WTH-B Thermostat Schlafen Tal lowbat(False) unreach(False) rssiDeviceValue(-58) "
"rssiPeerValue(-59) configPending(False) dutyCycle(False) operationLockActive(False) "
"actualTemperature(16.0) humidity(42) vaporAmount(5.710127947243264) "
"setPointTemperature(12.0)"
)

0 comments on commit 95c9932

Please sign in to comment.