Skip to content

Commit

Permalink
Add APsystems local API integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mawoka-myblock committed Apr 28, 2024
1 parent 0e912ec commit 0505a8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ omit =
homeassistant/components/edl21/sensor.py
homeassistant/components/egardia/*
homeassistant/components/electrasmart/__init__.py
homeassistant/components/electrasmart/__init__.py
homeassistant/components/electrasmart/climate.py
homeassistant/components/electrasmart/climate.py
homeassistant/components/electric_kiwi/__init__.py
homeassistant/components/electric_kiwi/api.py
Expand Down Expand Up @@ -854,11 +856,18 @@ omit =
homeassistant/components/mystrom/sensor.py
homeassistant/components/mystrom/switch.py
homeassistant/components/myuplink/__init__.py
homeassistant/components/myuplink/__init__.py
homeassistant/components/myuplink/api.py
homeassistant/components/myuplink/api.py
homeassistant/components/myuplink/application_credentials.py
homeassistant/components/myuplink/application_credentials.py
homeassistant/components/myuplink/coordinator.py
homeassistant/components/myuplink/coordinator.py
homeassistant/components/myuplink/entity.py
homeassistant/components/myuplink/entity.py
homeassistant/components/myuplink/helpers.py
homeassistant/components/myuplink/helpers.py
homeassistant/components/myuplink/sensor.py
homeassistant/components/myuplink/sensor.py
homeassistant/components/nad/media_player.py
homeassistant/components/nanoleaf/__init__.py
Expand Down
10 changes: 0 additions & 10 deletions tests/components/apsystemsapi_local/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

async def test_form_cannot_connect(hass: HomeAssistant, mock_setup_entry) -> None:
"""Test we handle cannot connect error."""
# aioclient_mock.get(
# "http://127.0.0.2:8050/getDeviceInfo", exc=aiohttp.ClientConnectionError
# )
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
Expand Down Expand Up @@ -52,14 +49,7 @@ async def test_form_cannot_connect(hass: HomeAssistant, mock_setup_entry) -> Non
"update_interval": 15,
},
)
# AiohttpClientMockResponse does not have .ok
# So, I check if it's coming that far and fail if that's not the case
assert result2.get("type") == FlowResultType.CREATE_ENTRY
assert result2["data"].get(CONF_IP_ADDRESS) == "127.0.0.1"
assert result2["data"].get(CONF_NAME) == "Solar"
assert result2["data"].get("update_interval") == 15
# aioclient_mock.get(
# "http://127.0.0.1:8050/getDeviceInfo",
# json=SUCCESS_DEVICE_INFO_DATA,
# headers={"Content-Type": "application/json"},
# )

0 comments on commit 0505a8b

Please sign in to comment.