Skip to content

Commit

Permalink
Add boilerplate async_remove_config_entry_device so users can remove …
Browse files Browse the repository at this point in the history
…dead devices. (#134)

* Add boilerplate async_remove_config_entry_device so users can remove dead devices.

Signed-off-by: Tom Wilkie <[email protected]>

* Lint.

Signed-off-by: Tom Wilkie <[email protected]>

* Import DeviceEntry

---------

Signed-off-by: Tom Wilkie <[email protected]>
Co-authored-by: Mick Vleeshouwer <[email protected]>
  • Loading branch information
tomwilkie and iMicknl authored Jan 30, 2023
1 parent 568d538 commit c98baea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom_components/nest_protect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.device_registry import DeviceEntry
from homeassistant.helpers.dispatcher import async_dispatcher_send

from .const import CONF_ACCOUNT_TYPE, CONF_REFRESH_TOKEN, DOMAIN, LOGGER, PLATFORMS
Expand Down Expand Up @@ -225,3 +226,10 @@ async def _async_subscribe_for_data(hass: HomeAssistant, entry: ConfigEntry, dat
LOGGER.exception(
"Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes."
)


async def async_remove_config_entry_device(
hass: HomeAssistant, config_entry: ConfigEntry, device_entry: DeviceEntry
) -> bool:
"""Remove a config entry from a device."""
return True

0 comments on commit c98baea

Please sign in to comment.