Add HmIP-FSI16 to HomematicIP Cloud (#37715)
parent
d4111617ca
commit
d119c96aee
|
@ -3,7 +3,7 @@
|
|||
"name": "HomematicIP Cloud",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/homematicip_cloud",
|
||||
"requirements": ["homematicip==0.10.18"],
|
||||
"requirements": ["homematicip==0.10.19"],
|
||||
"codeowners": ["@SukramJ"],
|
||||
"quality_scale": "platinum"
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ from typing import Any, Dict
|
|||
|
||||
from homematicip.aio.device import (
|
||||
AsyncBrandSwitchMeasuring,
|
||||
AsyncFullFlushInputSwitch,
|
||||
AsyncFullFlushSwitchMeasuring,
|
||||
AsyncHeatingSwitch2,
|
||||
AsyncMultiIOBox,
|
||||
|
@ -43,7 +44,12 @@ async def async_setup_entry(
|
|||
):
|
||||
entities.append(HomematicipSwitchMeasuring(hap, device))
|
||||
elif isinstance(
|
||||
device, (AsyncPlugableSwitch, AsyncPrintedCircuitBoardSwitchBattery)
|
||||
device,
|
||||
(
|
||||
AsyncPlugableSwitch,
|
||||
AsyncPrintedCircuitBoardSwitchBattery,
|
||||
AsyncFullFlushInputSwitch,
|
||||
),
|
||||
):
|
||||
entities.append(HomematicipSwitch(hap, device))
|
||||
elif isinstance(device, AsyncOpenCollector8Module):
|
||||
|
|
|
@ -733,7 +733,7 @@ homeassistant-pyozw==0.1.10
|
|||
homeconnect==0.5
|
||||
|
||||
# homeassistant.components.homematicip_cloud
|
||||
homematicip==0.10.18
|
||||
homematicip==0.10.19
|
||||
|
||||
# homeassistant.components.horizon
|
||||
horimote==0.4.1
|
||||
|
|
|
@ -359,7 +359,7 @@ homeassistant-pyozw==0.1.10
|
|||
homeconnect==0.5
|
||||
|
||||
# homeassistant.components.homematicip_cloud
|
||||
homematicip==0.10.18
|
||||
homematicip==0.10.19
|
||||
|
||||
# homeassistant.components.google
|
||||
# homeassistant.components.remember_the_milk
|
||||
|
|
|
@ -22,7 +22,7 @@ async def test_hmip_load_all_supported_devices(hass, default_mock_hap_factory):
|
|||
test_devices=None, test_groups=None
|
||||
)
|
||||
|
||||
assert len(mock_hap.hmip_device_by_entity_id) == 186
|
||||
assert len(mock_hap.hmip_device_by_entity_id) == 187
|
||||
|
||||
|
||||
async def test_hmip_remove_device(hass, default_mock_hap_factory):
|
||||
|
|
|
@ -59,6 +59,43 @@ async def test_hmip_switch(hass, default_mock_hap_factory):
|
|||
assert ha_state.state == STATE_ON
|
||||
|
||||
|
||||
async def test_hmip_switch_input(hass, default_mock_hap_factory):
|
||||
"""Test HomematicipSwitch."""
|
||||
entity_id = "switch.wohnzimmer_beleuchtung"
|
||||
entity_name = "Wohnzimmer Beleuchtung"
|
||||
device_model = "HmIP-FSI16"
|
||||
mock_hap = await default_mock_hap_factory.async_get_mock_hap(
|
||||
test_devices=[entity_name]
|
||||
)
|
||||
|
||||
ha_state, hmip_device = get_and_check_entity_basics(
|
||||
hass, mock_hap, entity_id, entity_name, device_model
|
||||
)
|
||||
|
||||
assert ha_state.state == STATE_ON
|
||||
service_call_counter = len(hmip_device.mock_calls)
|
||||
|
||||
await hass.services.async_call(
|
||||
"switch", "turn_off", {"entity_id": entity_id}, blocking=True
|
||||
)
|
||||
assert len(hmip_device.mock_calls) == service_call_counter + 1
|
||||
assert hmip_device.mock_calls[-1][0] == "turn_off"
|
||||
assert hmip_device.mock_calls[-1][1] == ()
|
||||
await async_manipulate_test_data(hass, hmip_device, "on", False)
|
||||
ha_state = hass.states.get(entity_id)
|
||||
assert ha_state.state == STATE_OFF
|
||||
|
||||
await hass.services.async_call(
|
||||
"switch", "turn_on", {"entity_id": entity_id}, blocking=True
|
||||
)
|
||||
assert len(hmip_device.mock_calls) == service_call_counter + 3
|
||||
assert hmip_device.mock_calls[-1][0] == "turn_on"
|
||||
assert hmip_device.mock_calls[-1][1] == ()
|
||||
await async_manipulate_test_data(hass, hmip_device, "on", True)
|
||||
ha_state = hass.states.get(entity_id)
|
||||
assert ha_state.state == STATE_ON
|
||||
|
||||
|
||||
async def test_hmip_switch_measuring(hass, default_mock_hap_factory):
|
||||
"""Test HomematicipSwitchMeasuring."""
|
||||
entity_id = "switch.pc"
|
||||
|
|
Loading…
Reference in New Issue