mirror of
https://github.com/elisspace/core.git
synced 2026-10-03 15:59:57 +00:00
Add custom panel to KNX integration
This commit is contained in:
committed by
Marvin Wichmann
parent
09d1c90e67
commit
dca7e9cb76
@@ -20,6 +20,7 @@ from xknx.telegram.address import (
|
||||
parse_device_group_address,
|
||||
)
|
||||
from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
|
||||
from xknx_custom_panel import get_knx_ui
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
@@ -218,6 +219,24 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
|
||||
register_websocket_api(hass)
|
||||
|
||||
url = "/api/panel_custom/knx_ui"
|
||||
hass.http.register_static_path(url, get_knx_ui())
|
||||
hass.components.frontend.async_register_built_in_panel(
|
||||
component_name="custom",
|
||||
sidebar_title="KNX UI",
|
||||
sidebar_icon="mdi:earth",
|
||||
frontend_url_path="knx_ui",
|
||||
config={
|
||||
"_panel_custom": {
|
||||
"name": "knx-custom-panel",
|
||||
"embed_iframe": False,
|
||||
"trust_external": False,
|
||||
"js_url": url,
|
||||
}
|
||||
},
|
||||
require_admin=True,
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "KNX",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/knx",
|
||||
"requirements": ["xknx==0.22.1"],
|
||||
"requirements": ["xknx==0.22.1", "xknx-custom-panel==1.6.6"],
|
||||
"codeowners": ["@Julius2342", "@farmio", "@marvin-w"],
|
||||
"quality_scale": "platinum",
|
||||
"iot_class": "local_push",
|
||||
|
||||
@@ -2484,6 +2484,7 @@ xiaomi-ble==0.9.0
|
||||
|
||||
# homeassistant.components.knx
|
||||
xknx==0.22.1
|
||||
xknx-custom-panel==1.6.6
|
||||
|
||||
# homeassistant.components.bluesound
|
||||
# homeassistant.components.fritz
|
||||
|
||||
@@ -1682,6 +1682,7 @@ xiaomi-ble==0.9.0
|
||||
|
||||
# homeassistant.components.knx
|
||||
xknx==0.22.1
|
||||
xknx-custom-panel==1.6.6
|
||||
|
||||
# homeassistant.components.bluesound
|
||||
# homeassistant.components.fritz
|
||||
|
||||
Reference in New Issue
Block a user