Do not attempt to unload non loaded config entries (#51356)
This commit is contained in:
parent
d51fc5814a
commit
1d9d9021de
9 changed files with 19 additions and 0 deletions
|
@ -19,6 +19,7 @@ from homeassistant.components.cover import (
|
|||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.const import ATTR_BATTERY_LEVEL, ATTR_ENTITY_ID, STATE_UNAVAILABLE
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
|
@ -191,6 +192,7 @@ async def test_unload_config_entry(hass, device_factory):
|
|||
"Garage", [Capability.garage_door_control], {Attribute.door: "open"}
|
||||
)
|
||||
config_entry = await setup_platform(hass, COVER_DOMAIN, devices=[device])
|
||||
config_entry.state = ConfigEntryState.LOADED
|
||||
# Act
|
||||
await hass.config_entries.async_forward_entry_unload(config_entry, COVER_DOMAIN)
|
||||
# Assert
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue