21 lines
582 B
Python
21 lines
582 B
Python
"""The MB-Secure integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from homeassistant.config_entries import ConfigEntry
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .const import DOMAIN
|
|
|
|
|
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|
"""Set up MB-Secure from a config entry."""
|
|
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = None
|
|
return True
|
|
|
|
|
|
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|
"""Unload an MB-Secure config entry."""
|
|
hass.data[DOMAIN].pop(entry.entry_id)
|
|
return True
|