diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fa93938..435482fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.rst b/README.rst index 2245929d..9e74bd05 100644 --- a/README.rst +++ b/README.rst @@ -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: --------------------------- diff --git a/homematicip/aio/class_maps.py b/homematicip/aio/class_maps.py index 82441ded..20808ae6 100644 --- a/homematicip/aio/class_maps.py +++ b/homematicip/aio/class_maps.py @@ -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, diff --git a/homematicip/aio/device.py b/homematicip/aio/device.py index 40a7bfa8..86bb6fb8 100644 --- a/homematicip/aio/device.py +++ b/homematicip/aio/device.py @@ -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) """ diff --git a/homematicip/base/enums.py b/homematicip/base/enums.py index a1f99267..8fbad83a 100644 --- a/homematicip/base/enums.py +++ b/homematicip/base/enums.py @@ -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() diff --git a/homematicip/class_maps.py b/homematicip/class_maps.py index f5ddccc4..e76d8fb7 100644 --- a/homematicip/class_maps.py +++ b/homematicip/class_maps.py @@ -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, diff --git a/homematicip/device.py b/homematicip/device.py index 3049668a..ceb3ceed 100644 --- a/homematicip/device.py +++ b/homematicip/device.py @@ -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) """ diff --git a/homematicip_demo/json_data/home.json b/homematicip_demo/json_data/home.json index 20d56f3e..8c9b72e2 100644 --- a/homematicip_demo/json_data/home.json +++ b/homematicip_demo/json_data/home.json @@ -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", diff --git a/tests/aio_tests/test_async_device.py b/tests/aio_tests/test_async_device.py index 9697a12f..9ec849d2 100644 --- a/tests/aio_tests/test_async_device.py +++ b/tests/aio_tests/test_async_device.py @@ -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)" + ) \ No newline at end of file diff --git a/tests/test_devices.py b/tests/test_devices.py index b1bc91c7..14915479 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -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)" + )