If no Reolink HTTP api available, do not set configuration_url (#146684)

* If no http api available, do not set configuration_url

* Add tests
This commit is contained in:
starkillerOG
2025-06-18 09:16:08 +02:00
committed by GitHub
parent ba2aac4614
commit 07110e288d
2 changed files with 23 additions and 2 deletions

View File

@@ -1186,6 +1186,19 @@ async def test_camera_wake_callback(
assert hass.states.get(entity_id).state == STATE_OFF
async def test_baichaun_only(
hass: HomeAssistant,
reolink_connect: MagicMock,
config_entry: MockConfigEntry,
) -> None:
"""Test initializing a baichuan only device."""
reolink_connect.baichuan_only = True
with patch("homeassistant.components.reolink.PLATFORMS", [Platform.SWITCH]):
assert await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
async def test_remove(
hass: HomeAssistant,
reolink_connect: MagicMock,