Migrate cast to use async_forward_entry_setups (#86558)
Replaces deprecated async_setup_platforms with async_forward_entry_setups
This commit is contained in:
parent
3bfdba50d9
commit
5285d057d2
3 changed files with 8 additions and 6 deletions
|
@ -16,6 +16,7 @@ from .const import DOMAIN, SIGNAL_HASS_CAST_SHOW_VIEW
|
|||
SERVICE_SHOW_VIEW = "show_lovelace_view"
|
||||
ATTR_VIEW_PATH = "view_path"
|
||||
ATTR_URL_PATH = "dashboard_path"
|
||||
CAST_USER_NAME = "Home Assistant Cast"
|
||||
NO_URL_AVAILABLE_ERROR = (
|
||||
"Home Assistant Cast requires your instance to be reachable via HTTPS. Enable Home"
|
||||
" Assistant Cloud or set up an external URL with valid SSL certificates"
|
||||
|
@ -34,7 +35,7 @@ async def async_setup_ha_cast(
|
|||
|
||||
if user is None:
|
||||
user = await hass.auth.async_create_system_user(
|
||||
"Home Assistant Cast", group_ids=[auth.const.GROUP_ID_ADMIN]
|
||||
CAST_USER_NAME, group_ids=[auth.const.GROUP_ID_ADMIN]
|
||||
)
|
||||
hass.config_entries.async_update_entry(
|
||||
entry, data={**entry.data, "user_id": user.id}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue