Skip to content
Snippets Groups Projects
Commit d78a6169 authored by jkerdreu's avatar jkerdreu
Browse files

- Added delete device (not fully working yet)

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@3013 b32b6428-25c9-4566-ad07-03861ab6144f
parent ddb07cae
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
import logging
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntry
from .bridge import Bridge
from .const import DOMAIN
......@@ -18,7 +20,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = bridge
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
#await bridge.wait_is_ready()
# await bridge.wait_is_ready()
return True
......@@ -33,3 +35,11 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
else:
_LOGGER.error("Unable to unload xAAL platforms")
return unload_ok
async def async_remove_config_entry_device(hass: HomeAssistant, entry: ConfigEntry, device_entry: DeviceEntry ) -> bool:
"""Remove a config entry from a device."""
#import pdb;pdb.set_trace()
bridge = hass.data[DOMAIN][entry.entry_id]
_LOGGER.warning(f"Deleting {device_entry}")
return True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment