mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 21:10:25 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user