Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.panel_custom Namespace Reference

Functions

None async_register_panel (HomeAssistant hass, str frontend_url_path, str webcomponent_name, str|None sidebar_title=None, str|None sidebar_icon=None, str|None js_url=None, str|None module_url=None, bool embed_iframe=DEFAULT_EMBED_IFRAME, bool trust_external=DEFAULT_TRUST_EXTERNAL, ConfigType|None config=None, bool require_admin=False, str|None config_panel_domain=None)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_COMPONENT_NAME = "name"
 
string CONF_CONFIG = "config"
 
string CONF_EMBED_IFRAME = "embed_iframe"
 
string CONF_JS_URL = "js_url"
 
string CONF_MODULE_URL = "module_url"
 
string CONF_REQUIRE_ADMIN = "require_admin"
 
string CONF_SIDEBAR_ICON = "sidebar_icon"
 
string CONF_SIDEBAR_TITLE = "sidebar_title"
 
string CONF_TRUST_EXTERNAL_SCRIPT = "trust_external_script"
 
string CONF_URL_EXCLUSIVE_GROUP = "url_exclusive_group"
 
string CONF_URL_PATH = "url_path"
 
 CONFIG_SCHEMA
 
bool DEFAULT_EMBED_IFRAME = False
 
string DEFAULT_ICON = "mdi:bookmark"
 
bool DEFAULT_TRUST_EXTERNAL = False
 
string DOMAIN = "panel_custom"
 
string LEGACY_URL = "/api/panel_custom/{}"
 
string PANEL_DIR = "panels"
 

Detailed Description

Register a custom front end panel.

Function Documentation

◆ async_register_panel()

None homeassistant.components.panel_custom.async_register_panel ( HomeAssistant  hass,
str  frontend_url_path,
str  webcomponent_name,
str | None   sidebar_title = None,
str | None   sidebar_icon = None,
str | None   js_url = None,
str | None   module_url = None,
bool   embed_iframe = DEFAULT_EMBED_IFRAME,
bool   trust_external = DEFAULT_TRUST_EXTERNAL,
ConfigType | None   config = None,
bool   require_admin = False,
str | None   config_panel_domain = None 
)
Register a new custom panel.

Definition at line 75 of file __init__.py.

◆ async_setup()

bool homeassistant.components.panel_custom.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Initialize custom panel.

Definition at line 137 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.panel_custom._LOGGER = logging.getLogger(__name__)
private

Definition at line 15 of file __init__.py.

◆ CONF_COMPONENT_NAME

string homeassistant.components.panel_custom.CONF_COMPONENT_NAME = "name"

Definition at line 18 of file __init__.py.

◆ CONF_CONFIG

string homeassistant.components.panel_custom.CONF_CONFIG = "config"

Definition at line 22 of file __init__.py.

◆ CONF_EMBED_IFRAME

string homeassistant.components.panel_custom.CONF_EMBED_IFRAME = "embed_iframe"

Definition at line 25 of file __init__.py.

◆ CONF_JS_URL

string homeassistant.components.panel_custom.CONF_JS_URL = "js_url"

Definition at line 23 of file __init__.py.

◆ CONF_MODULE_URL

string homeassistant.components.panel_custom.CONF_MODULE_URL = "module_url"

Definition at line 24 of file __init__.py.

◆ CONF_REQUIRE_ADMIN

string homeassistant.components.panel_custom.CONF_REQUIRE_ADMIN = "require_admin"

Definition at line 28 of file __init__.py.

◆ CONF_SIDEBAR_ICON

string homeassistant.components.panel_custom.CONF_SIDEBAR_ICON = "sidebar_icon"

Definition at line 20 of file __init__.py.

◆ CONF_SIDEBAR_TITLE

string homeassistant.components.panel_custom.CONF_SIDEBAR_TITLE = "sidebar_title"

Definition at line 19 of file __init__.py.

◆ CONF_TRUST_EXTERNAL_SCRIPT

string homeassistant.components.panel_custom.CONF_TRUST_EXTERNAL_SCRIPT = "trust_external_script"

Definition at line 26 of file __init__.py.

◆ CONF_URL_EXCLUSIVE_GROUP

string homeassistant.components.panel_custom.CONF_URL_EXCLUSIVE_GROUP = "url_exclusive_group"

Definition at line 27 of file __init__.py.

◆ CONF_URL_PATH

string homeassistant.components.panel_custom.CONF_URL_PATH = "url_path"

Definition at line 21 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.panel_custom.CONFIG_SCHEMA

Definition at line 39 of file __init__.py.

◆ DEFAULT_EMBED_IFRAME

bool homeassistant.components.panel_custom.DEFAULT_EMBED_IFRAME = False

Definition at line 30 of file __init__.py.

◆ DEFAULT_ICON

string homeassistant.components.panel_custom.DEFAULT_ICON = "mdi:bookmark"

Definition at line 33 of file __init__.py.

◆ DEFAULT_TRUST_EXTERNAL

bool homeassistant.components.panel_custom.DEFAULT_TRUST_EXTERNAL = False

Definition at line 31 of file __init__.py.

◆ DOMAIN

string homeassistant.components.panel_custom.DOMAIN = "panel_custom"

Definition at line 17 of file __init__.py.

◆ LEGACY_URL

string homeassistant.components.panel_custom.LEGACY_URL = "/api/panel_custom/{}"

Definition at line 34 of file __init__.py.

◆ PANEL_DIR

string homeassistant.components.panel_custom.PANEL_DIR = "panels"

Definition at line 36 of file __init__.py.