Allow empty cast media_player config (#38971)

This commit is contained in:
Erik Montnemery authored and GitHub committed 2020-08-18 08:04:32 +02:00
1 parent e9f32617cc
commit af9ae2e0a4
1 file changed
+1 -1
@@ -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]