Allow empty cast media_player config (#38971)
This commit is contained in:
parent
e9f32617cc
commit
af9ae2e0a4
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ async def async_setup_platform(
|
|||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up Cast from a config entry."""
|
||||
config = hass.data[CAST_DOMAIN].get("media_player", {})
|
||||
config = hass.data[CAST_DOMAIN].get("media_player") or {}
|
||||
if not isinstance(config, list):
|
||||
config = [config]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue