Add new devices to HomematicIP Cloud (#31914)

* Add new devices to HomematicIP Cloud

Adds:
- HMIP-WTH-B (Wall Thermostat Basic)
- ALPHA-IP-RBG (Alpha IP Wall Thermostat Display)
- ALPHA-IP-RBGa (ALpha IP Wall Thermostat Display analog)

* Update homeassistant/components/homematicip_cloud/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
SukramJ 2020-02-19 10:43:12 +01:00 committed by GitHub
parent 21f8d0a80c
commit f4f01cb23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 234 additions and 0 deletions

View File

@ -14,6 +14,7 @@ from homematicip.aio.device import (
AsyncPassageDetector,
AsyncPlugableSwitchMeasuring,
AsyncPresenceDetectorIndoor,
AsyncRoomControlDeviceAnalog,
AsyncTemperatureHumiditySensorDisplay,
AsyncTemperatureHumiditySensorOutdoor,
AsyncTemperatureHumiditySensorWithoutDisplay,
@ -79,6 +80,8 @@ async def async_setup_entry(
):
entities.append(HomematicipTemperatureSensor(hap, device))
entities.append(HomematicipHumiditySensor(hap, device))
elif isinstance(device, (AsyncRoomControlDeviceAnalog,)):
entities.append(HomematicipTemperatureSensor(hap, device))
if isinstance(
device,
(

View File

@ -15,6 +15,15 @@ from .helper import (
)
async def test_hmip_load_all_supported_devices(hass, default_mock_hap_factory):
"""Ensure that all supported devices could be loaded."""
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=None, test_groups=None
)
assert len(mock_hap.hmip_device_by_entity_id) == 182
async def test_hmip_remove_device(hass, default_mock_hap_factory):
"""Test Remove of hmip device."""
entity_id = "light.treppe"

View File

@ -165,6 +165,31 @@ async def test_hmip_temperature_sensor2(hass, default_mock_hap_factory):
assert ha_state.attributes[ATTR_TEMPERATURE_OFFSET] == 10
async def test_hmip_temperature_sensor3(hass, default_mock_hap_factory):
"""Test HomematicipTemperatureSensor."""
entity_id = "sensor.raumbediengerat_analog_temperature"
entity_name = "Raumbediengerät Analog Temperature"
device_model = "ALPHA-IP-RBGa"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=["Raumbediengerät Analog"]
)
ha_state, hmip_device = get_and_check_entity_basics(
hass, mock_hap, entity_id, entity_name, device_model
)
assert ha_state.state == "23.3"
assert ha_state.attributes[ATTR_UNIT_OF_MEASUREMENT] == TEMP_CELSIUS
await async_manipulate_test_data(hass, hmip_device, "actualTemperature", 23.5)
ha_state = hass.states.get(entity_id)
assert ha_state.state == "23.5"
assert not ha_state.attributes.get(ATTR_TEMPERATURE_OFFSET)
await async_manipulate_test_data(hass, hmip_device, "temperatureOffset", 10)
ha_state = hass.states.get(entity_id)
assert ha_state.attributes[ATTR_TEMPERATURE_OFFSET] == 10
async def test_hmip_power_sensor(hass, default_mock_hap_factory):
"""Test HomematicipPowerSensor."""
entity_id = "sensor.flur_oben_power"

View File

@ -14,6 +14,203 @@
}
},
"devices": {
"3014F711000BBBB000000000": {
"availableFirmwareVersion": "2.0.2",
"firmwareVersion": "2.0.2",
"firmwareVersionInteger": 131074,
"functionalChannels": {
"0": {
"coProFaulty": false,
"coProRestartNeeded": false,
"coProUpdateFailure": false,
"configPending": false,
"deviceId": "3014F711000BBBB000000000",
"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": -45,
"rssiPeerValue": -54,
"supportedOptionalFeatures": {
"IFeatureDeviceCoProError": false,
"IFeatureDeviceCoProRestart": false,
"IFeatureDeviceCoProUpdate": false,
"IFeatureDeviceOverheated": false,
"IFeatureDeviceOverloaded": false,
"IFeatureDeviceTemperatureOutOfRange": false,
"IFeatureDeviceUndervoltage": false
},
"temperatureOutOfRange": false,
"unreach": false
},
"1": {
"actualTemperature": 23.0,
"deviceId": "3014F711000BBBB000000000",
"display": "ACTUAL",
"functionalChannelType": "WALL_MOUNTED_THERMOSTAT_PRO_CHANNEL",
"groupIndex": 1,
"groups": [],
"humidity": 52,
"index": 1,
"label": "",
"setPointTemperature": 20.0,
"temperatureOffset": 0.0,
"vaporAmount": 10.662700840292974
}
},
"homeId": "00000000-0000-0000-0000-000000000001",
"id": "3014F711000BBBB000000000",
"label": "Raumbedienger\u00e4t",
"lastStatusUpdate": 1579383507353,
"liveUpdateState": "LIVE_UPDATE_NOT_SUPPORTED",
"manufacturerCode": 1,
"modelId": 282,
"modelType": "ALPHA-IP-RBG",
"oem": "M\u00f6hlenhoff",
"permanentlyReachable": true,
"serializedGlobalTradeItemNumber": "3014F711000BBBB000000000",
"type": "ROOM_CONTROL_DEVICE",
"updateState": "UP_TO_DATE"
},
"3014F711000000BBBB000005": {
"availableFirmwareVersion": "1.0.16",
"firmwareVersion": "1.0.12",
"firmwareVersionInteger": 65548,
"functionalChannels": {
"0": {
"coProFaulty": false,
"coProRestartNeeded": false,
"coProUpdateFailure": false,
"configPending": false,
"deviceId": "3014F711000000BBBB000005",
"deviceOverheated": false,
"deviceOverloaded": false,
"deviceUndervoltage": false,
"dutyCycle": false,
"functionalChannelType": "DEVICE_BASE",
"groupIndex": 0,
"groups": [],
"index": 0,
"label": "",
"lowBat": false,
"routerModuleEnabled": false,
"routerModuleSupported": false,
"rssiDeviceValue": -41,
"rssiPeerValue": -29,
"supportedOptionalFeatures": {
"IFeatureDeviceCoProError": false,
"IFeatureDeviceCoProRestart": false,
"IFeatureDeviceCoProUpdate": false,
"IFeatureDeviceOverheated": false,
"IFeatureDeviceOverloaded": false,
"IFeatureDeviceTemperatureOutOfRange": false,
"IFeatureDeviceUndervoltage": false
},
"temperatureOutOfRange": false,
"unreach": false
},
"1": {
"actualTemperature": 23.3,
"deviceId": "3014F711000000BBBB000005",
"functionalChannelType": "ANALOG_ROOM_CONTROL_CHANNEL",
"groupIndex": 1,
"groups": [],
"index": 1,
"label": "",
"setPointTemperature": 23.0,
"temperatureOffset": 0.0
}
},
"homeId": "00000000-0000-0000-0000-000000000001",
"id": "3014F711000000BBBB000005",
"label": "Raumbedienger\u00e4t Analog",
"lastStatusUpdate": 1579384126279,
"liveUpdateState": "LIVE_UPDATE_NOT_SUPPORTED",
"manufacturerCode": 1,
"modelId": 281,
"modelType": "ALPHA-IP-RBGa",
"oem": "M\u00f6hlenhoff",
"permanentlyReachable": true,
"serializedGlobalTradeItemNumber": "3014F711000000BBBB000005",
"type": "ROOM_CONTROL_DEVICE_ANALOG",
"updateState": "TRANSFERING_UPDATE"
},
"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": {
"IFeatureDeviceCoProError": false,
"IFeatureDeviceCoProRestart": false,
"IFeatureDeviceCoProUpdate": false,
"IFeatureDeviceOverheated": false,
"IFeatureDeviceOverloaded": 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",