This repository has been archived by the owner on Aug 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
705de92
commit 9b9bbc6
Showing
72 changed files
with
93,857 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import logging | ||
|
||
from .load_plugins import load_plugins | ||
from .load_dashboard import load_dashboard | ||
from .const import DOMAIN | ||
from .process_yaml import process_yaml | ||
from .notifications import notifications | ||
|
||
from homeassistant.components import frontend | ||
|
||
from collections import OrderedDict | ||
from typing import Any, Mapping, MutableMapping, Optional | ||
|
||
from homeassistant.helpers import discovery | ||
|
||
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
async def async_setup(hass, config): | ||
#_LOGGER.warning("async_setup") | ||
|
||
#_LOGGER.warning(config) | ||
#_LOGGER.warning(hass.data[DOMAIN]) | ||
|
||
# if not config.get(DOMAIN): | ||
# _LOGGER.warning("no config") | ||
|
||
hass.data[DOMAIN] = { | ||
"notifications": {}, | ||
"commands": {}, | ||
'latest_version': "" | ||
} | ||
|
||
load_plugins(hass, DOMAIN) | ||
|
||
notifications(hass, DOMAIN) | ||
|
||
return True | ||
|
||
async def async_setup_entry(hass, config_entry): | ||
#_LOGGER.warning("async_setup_entry") | ||
|
||
# _LOGGER.error(print(hass.data["hass_customize"])) | ||
# for test in hass.data["hass_customize"].items(): | ||
# _LOGGER.warning(test) | ||
|
||
process_yaml(hass, config_entry) | ||
|
||
load_dashboard(hass, config_entry) | ||
|
||
config_entry.add_update_listener(_update_listener) | ||
|
||
hass.async_add_job( | ||
hass.config_entries.async_forward_entry_setup( | ||
config_entry, "sensor" | ||
) | ||
) | ||
|
||
return True | ||
|
||
async def async_remove_entry(hass, config_entry): | ||
_LOGGER.warning("Dwains Dashboard is now uninstalled.") | ||
|
||
frontend.async_remove_panel(hass, "dwains-dashboard") | ||
|
||
async def _update_listener(hass, config_entry): | ||
_LOGGER.warning('Update_listener called') | ||
|
||
process_yaml(hass, config_entry) | ||
|
||
hass.bus.async_fire("dwains_dashboard_reload") | ||
|
||
#register_modules(hass, config_entry.options) | ||
#load_dashboard(hass, config_entry) | ||
|
||
return True |
Binary file added
BIN
+1.58 KB
config/custom_components/dwains_dashboard/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+2.52 KB
config/custom_components/dwains_dashboard/__pycache__/config_flow.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+191 Bytes
config/custom_components/dwains_dashboard/__pycache__/const.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+980 Bytes
config/custom_components/dwains_dashboard/__pycache__/load_dashboard.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+1.63 KB
config/custom_components/dwains_dashboard/__pycache__/load_plugins.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+5.62 KB
config/custom_components/dwains_dashboard/__pycache__/notifications.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+7.15 KB
config/custom_components/dwains_dashboard/__pycache__/process_yaml.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+3.45 KB
config/custom_components/dwains_dashboard/__pycache__/sensor.cpython-38.pyc
Binary file not shown.
547 changes: 547 additions & 0 deletions
547
config/custom_components/dwains_dashboard/cards/button-card/button-card.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
..._components/dwains_dashboard/cards/dwains-auto-entities-card/dwains-auto-entities-card.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.