mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered * Add sync_entity_lifecycle to collection helper * Remove debug print * Lint * Fix tests * Fix tests * Update zha * Update zone * Fix tests * Update hyperion * Update rfxtrx * Fix tests * Pass force_remove=True from integrations Co-authored-by: Erik <erik@montnemery.com>
This commit is contained in:
@@ -9,6 +9,7 @@ from pysmartthings.device import Status
|
||||
|
||||
from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.const import STATE_UNAVAILABLE
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
|
||||
from .conftest import setup_platform
|
||||
@@ -104,4 +105,4 @@ async def test_unload_config_entry(hass, device_factory):
|
||||
# Act
|
||||
await hass.config_entries.async_forward_entry_unload(config_entry, "lock")
|
||||
# Assert
|
||||
assert not hass.states.get("lock.lock_1")
|
||||
assert hass.states.get("lock.lock_1").state == STATE_UNAVAILABLE
|
||||
|
||||
Reference in New Issue
Block a user