Skip to content

Commit

Permalink
fix the issue when remove the account configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
georgezhao2010 committed Sep 22, 2023
1 parent 7260aef commit 3ccfd00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/midea_ac_lan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry):


async def async_unload_entry(hass: HomeAssistant, config_entry):
device_type = config_entry.data.get(CONF_TYPE)
if device_type == CONF_ACCOUNT:
return True
device_id = config_entry.data.get(CONF_DEVICE_ID)
if device_id is not None:
dm = hass.data[DOMAIN][DEVICES].get(device_id)
Expand Down

0 comments on commit 3ccfd00

Please sign in to comment.