Add Device Registry support and Device Info for ISY994 (#35435)

* ISY994 Add device info properties

* Fix test string literal per review.

* Change Mfr ID to Devtype_gen
This commit is contained in:
shbatm 2020-05-09 19:48:51 -05:00 committed by GitHub
parent 0fabd73ad4
commit 0cf1ca7736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 4 deletions

View file

@ -74,7 +74,7 @@ async def test_form(hass: HomeAssistantType):
PATCH_ASYNC_SETUP_ENTRY, return_value=True,
) as mock_setup_entry:
isy_conn = mock_connection_class.return_value
isy_conn.get_config.return_value = "<xml></xml>"
isy_conn.get_config.return_value = None
mock_config_class.return_value = MOCK_VALIDATED_RESPONSE
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"], MOCK_USER_INPUT,
@ -154,7 +154,7 @@ async def test_form_existing_config_entry(hass: HomeAssistantType):
PATCH_CONNECTION
) as mock_connection_class:
isy_conn = mock_connection_class.return_value
isy_conn.get_config.return_value = "<xml></xml>"
isy_conn.get_config.return_value = None
mock_config_class.return_value = MOCK_VALIDATED_RESPONSE
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"], MOCK_USER_INPUT,
@ -170,7 +170,7 @@ async def test_import_flow_some_fields(hass: HomeAssistantType) -> None:
PATCH_ASYNC_SETUP_ENTRY, return_value=True,
):
isy_conn = mock_connection_class.return_value
isy_conn.get_config.return_value = "<xml></xml>"
isy_conn.get_config.return_value = None
mock_config_class.return_value = MOCK_VALIDATED_RESPONSE
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=MOCK_IMPORT_BASIC_CONFIG,
@ -190,7 +190,7 @@ async def test_import_flow_all_fields(hass: HomeAssistantType) -> None:
PATCH_ASYNC_SETUP_ENTRY, return_value=True,
):
isy_conn = mock_connection_class.return_value
isy_conn.get_config.return_value = "<xml></xml>"
isy_conn.get_config.return_value = None
mock_config_class.return_value = MOCK_VALIDATED_RESPONSE
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=MOCK_IMPORT_FULL_CONFIG,