1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use IP addresses instead of mDNS names when wled discovered (#33608)

This commit is contained in:
Paulus Schoutsen
2020-04-03 22:41:08 -07:00
committed by GitHub
parent 07ae3f9ee9
commit c6ba607c8c
6 changed files with 35 additions and 33 deletions

View File

@@ -141,7 +141,7 @@ async def test_light_error(
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, caplog
) -> None:
"""Test error handling of the WLED lights."""
aioclient_mock.post("http://example.local:80/json/state", text="", status=400)
aioclient_mock.post("http://192.168.1.123:80/json/state", text="", status=400)
await init_integration(hass, aioclient_mock)
with patch("homeassistant.components.wled.WLEDDataUpdateCoordinator.async_refresh"):
@@ -162,7 +162,7 @@ async def test_light_connection_error(
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
) -> None:
"""Test error handling of the WLED switches."""
aioclient_mock.post("http://example.local:80/json/state", exc=aiohttp.ClientError)
aioclient_mock.post("http://192.168.1.123:80/json/state", exc=aiohttp.ClientError)
await init_integration(hass, aioclient_mock)
with patch("homeassistant.components.wled.WLEDDataUpdateCoordinator.async_refresh"):
@@ -339,7 +339,7 @@ async def test_effect_service_error(
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, caplog
) -> None:
"""Test error handling of the WLED effect service."""
aioclient_mock.post("http://example.local:80/json/state", text="", status=400)
aioclient_mock.post("http://192.168.1.123:80/json/state", text="", status=400)
await init_integration(hass, aioclient_mock)
with patch("homeassistant.components.wled.WLEDDataUpdateCoordinator.async_refresh"):