mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-17 02:54:41 +00:00
Updated HACS and also fixed Garadget #727
This commit is contained in:
13
config/custom_components/hacs/configuration_schema.py
Executable file → Normal file
13
config/custom_components/hacs/configuration_schema.py
Executable file → Normal file
@@ -8,6 +8,7 @@ TOKEN = "token"
|
||||
SIDEPANEL_TITLE = "sidepanel_title"
|
||||
SIDEPANEL_ICON = "sidepanel_icon"
|
||||
APPDAEMON = "appdaemon"
|
||||
NETDAEMON = "netdaemon"
|
||||
PYTHON_SCRIPT = "python_script"
|
||||
THEME = "theme"
|
||||
|
||||
@@ -18,7 +19,7 @@ RELEASE_LIMIT = "release_limit"
|
||||
EXPERIMENTAL = "experimental"
|
||||
|
||||
|
||||
def hacs_base_config_schema(config: dict = {}) -> dict:
|
||||
def hacs_base_config_schema(config: dict = {}, config_flow: bool = False) -> dict:
|
||||
"""Return a shcema configuration dict for HACS."""
|
||||
if not config:
|
||||
config = {
|
||||
@@ -26,14 +27,24 @@ def hacs_base_config_schema(config: dict = {}) -> dict:
|
||||
SIDEPANEL_ICON: "mdi:alpha-c-box",
|
||||
SIDEPANEL_TITLE: "HACS",
|
||||
APPDAEMON: False,
|
||||
NETDAEMON: False,
|
||||
PYTHON_SCRIPT: False,
|
||||
THEME: False,
|
||||
}
|
||||
if config_flow:
|
||||
return {
|
||||
vol.Required(TOKEN, default=config.get(TOKEN)): str,
|
||||
vol.Optional(SIDEPANEL_TITLE, default=config.get(SIDEPANEL_TITLE)): str,
|
||||
vol.Optional(SIDEPANEL_ICON, default=config.get(SIDEPANEL_ICON)): str,
|
||||
vol.Optional(APPDAEMON, default=config.get(APPDAEMON)): bool,
|
||||
vol.Optional(NETDAEMON, default=config.get(NETDAEMON)): bool,
|
||||
}
|
||||
return {
|
||||
vol.Required(TOKEN, default=config.get(TOKEN)): str,
|
||||
vol.Optional(SIDEPANEL_TITLE, default=config.get(SIDEPANEL_TITLE)): str,
|
||||
vol.Optional(SIDEPANEL_ICON, default=config.get(SIDEPANEL_ICON)): str,
|
||||
vol.Optional(APPDAEMON, default=config.get(APPDAEMON)): bool,
|
||||
vol.Optional(NETDAEMON, default=config.get(NETDAEMON)): bool,
|
||||
vol.Optional(PYTHON_SCRIPT, default=config.get(PYTHON_SCRIPT)): bool,
|
||||
vol.Optional(THEME, default=config.get(THEME)): bool,
|
||||
}
|
||||
|
Reference in New Issue
Block a user