Adds enabled entity_ids associated with each speaker (#64876)

pull/63357/head^2
jjlawren 2022-01-24 18:29:29 -06:00 committed by GitHub
parent e6111ac277
commit d9b81bb04d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -106,5 +106,10 @@ async def async_generate_speaker_info(
value = getattr(speaker, attrib)
payload[attrib] = get_contents(value)
payload["enabled_entities"] = {
entity_id
for entity_id, s in hass.data[DATA_SONOS].entity_id_mappings.items()
if s is speaker
}
payload["media"] = await async_generate_media_info(hass, speaker)
return payload