-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bram van Dartel
committed
Dec 28, 2024
1 parent
4b8577e
commit ad113d4
Showing
9 changed files
with
364 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
from homeassistant.config_entries import ConfigEntry | ||
from homeassistant.core import HomeAssistant | ||
from homeassistant.helpers.typing import ConfigType | ||
from .const.const import DOMAIN | ||
# from homeassistant.config_entries import ConfigEntry | ||
# from homeassistant.core import HomeAssistant | ||
# from homeassistant.helpers.typing import ConfigType | ||
# from .const.const import DOMAIN | ||
|
||
|
||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: | ||
"""Set up the Afvalwijzer integration.""" | ||
hass.data.setdefault(DOMAIN, {}) | ||
return True | ||
# async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: | ||
# """Set up the Afvalwijzer integration.""" | ||
# hass.data.setdefault(DOMAIN, {}) | ||
# return True | ||
|
||
|
||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | ||
"""Set up Afvalwijzer from a config entry.""" | ||
# Store config entry data | ||
hass.data[DOMAIN][entry.entry_id] = entry.data | ||
# async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | ||
# """Set up Afvalwijzer from a config entry.""" | ||
# # Store config entry data | ||
# hass.data[DOMAIN][entry.entry_id] = entry.data | ||
|
||
# Forward the setup to the sensor platform | ||
await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) | ||
return True | ||
# # Forward the setup to the sensor platform | ||
# await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) | ||
# return True | ||
|
||
|
||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | ||
"""Unload a config entry.""" | ||
# Remove stored data | ||
if entry.entry_id in hass.data[DOMAIN]: | ||
hass.data[DOMAIN].pop(entry.entry_id) | ||
# async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | ||
# """Unload a config entry.""" | ||
# # Remove stored data | ||
# if entry.entry_id in hass.data[DOMAIN]: | ||
# hass.data[DOMAIN].pop(entry.entry_id) | ||
|
||
# Unload the sensor platform | ||
await hass.config_entries.async_forward_entry_unload(entry, "sensor") | ||
return True | ||
# # Unload the sensor platform | ||
# await hass.config_entries.async_forward_entry_unload(entry, "sensor") | ||
# return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.