Use new HMIP labels for HomematicIP Cloud multi devices (#32925)

* Use new labels for HomematicIP Cloud multi devices

* Update homeassistant/components/homematicip_cloud/device.py

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

* Update name composition

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
SukramJandspringstan authored and GitHub committed 2020-03-29 21:38:59 +02:00
1 parent d45c386149
commit 1cd0e764b6
6 files changed
+51 -25

No files matched your search

@@ -26,11 +26,11 @@ async def test_hmip_load_all_supported_devices(hass, default_mock_hap_factory):
async def test_hmip_remove_device(hass, default_mock_hap_factory):
"""Test Remove of hmip device."""
entity_id = "light.treppe"
entity_name = "Treppe"
entity_id = "light.treppe_ch"
entity_name = "Treppe CH"
device_model = "HmIP-BSL"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=[entity_name]
test_devices=["Treppe"]
)
ha_state, hmip_device = get_and_check_entity_basics(
@@ -58,11 +58,11 @@ async def test_hmip_remove_device(hass, default_mock_hap_factory):
async def test_hmip_add_device(hass, default_mock_hap_factory, hmip_config_entry):
"""Test Remove of hmip device."""
entity_id = "light.treppe"
entity_name = "Treppe"
entity_id = "light.treppe_ch"
entity_name = "Treppe CH"
device_model = "HmIP-BSL"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=[entity_name]
test_devices=["Treppe"]
)
ha_state, hmip_device = get_and_check_entity_basics(
@@ -137,11 +137,11 @@ async def test_all_devices_unavailable_when_hap_not_connected(
hass, default_mock_hap_factory
):
"""Test make all devices unavaulable when hap is not connected."""
entity_id = "light.treppe"
entity_name = "Treppe"
entity_id = "light.treppe_ch"
entity_name = "Treppe CH"
device_model = "HmIP-BSL"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=[entity_name]
test_devices=["Treppe"]
)
ha_state, hmip_device = get_and_check_entity_basics(
@@ -161,11 +161,11 @@ async def test_all_devices_unavailable_when_hap_not_connected(
async def test_hap_reconnected(hass, default_mock_hap_factory):
"""Test reconnect hap."""
entity_id = "light.treppe"
entity_name = "Treppe"
entity_id = "light.treppe_ch"
entity_name = "Treppe CH"
device_model = "HmIP-BSL"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=[entity_name]
test_devices=["Treppe"]
)
ha_state, hmip_device = get_and_check_entity_basics(
@@ -192,8 +192,8 @@ async def test_hap_reconnected(hass, default_mock_hap_factory):
async def test_hap_with_name(hass, mock_connection, hmip_config_entry):
"""Test hap with name."""
home_name = "TestName"
entity_id = f"light.{home_name.lower()}_treppe"
entity_name = f"{home_name} Treppe"
entity_id = f"light.{home_name.lower()}_treppe_ch"
entity_name = f"{home_name} Treppe CH"
device_model = "HmIP-BSL"
hmip_config_entry.data = {**hmip_config_entry.data, "name": home_name}
@@ -27,11 +27,11 @@ async def test_manually_configured_platform(hass):
async def test_hmip_light(hass, default_mock_hap_factory):
"""Test HomematicipLight."""
entity_id = "light.treppe"
entity_name = "Treppe"
entity_id = "light.treppe_ch"
entity_name = "Treppe CH"
device_model = "HmIP-BSL"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=[entity_name]
test_devices=["Treppe"]
)
ha_state, hmip_device = get_and_check_entity_basics(
@@ -66,8 +66,8 @@ async def test_hmip_light(hass, default_mock_hap_factory):
async def test_hmip_notification_light(hass, default_mock_hap_factory):
"""Test HomematicipNotificationLight."""
entity_id = "light.treppe_top_notification"
entity_name = "Treppe Top Notification"
entity_id = "light.alarm_status"
entity_name = "Alarm Status"
device_model = "HmIP-BSL"
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
test_devices=["Treppe"]