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:
SukramJandspringstan authored and GitHub committed 2020-02-19 10:43:12 +01:00
1 parent 21f8d0a80c
commit f4f01cb23a
4 files changed
+234

No files matched your search

@@ -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"
@@ -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"