Ensure Reolink can start when privacy mode is enabled (#136514)

* Allow startup when privacy mode is enabled

* Add tests

* remove duplicate privacy_mode

* fix tests

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* Store in subfolder and cleanup when removed

* Add tests and fixes

* fix styling

* rename CONF_PRIVACY to CONF_SUPPORTS_PRIVACY_MODE

* use helper store

---------

Co-authored-by: Robert Resch <robert@resch.dev>
This commit is contained in:
starkillerOG
2025-01-31 19:48:47 +01:00
committed by GitHub
parent df59b1d4fa
commit 92dd18a9be
8 changed files with 102 additions and 18 deletions

View File

@@ -859,3 +859,15 @@ async def test_privacy_mode_change_callback(
assert reolink_connect.get_states.call_count >= 1
assert hass.states.get(entity_id).state == STATE_ON
async def test_remove(
hass: HomeAssistant,
reolink_connect: MagicMock,
config_entry: MockConfigEntry,
) -> None:
"""Test removing of the reolink integration."""
assert await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
assert await hass.config_entries.async_remove(config_entry.entry_id)