async def google_assistant_list(hass, connection, msg): """List all google assistant entities.""" cloud = hass.data[DOMAIN] gconf = await cloud.client.get_google_config() entities = google_helpers.async_get_entities(hass, gconf) result = [] for entity in entities: result.append({ "entity_id": entity.entity_id, "traits": [trait.name for trait in entity.traits()], "might_2fa": entity.might_2fa_traits(), }) connection.send_result(msg["id"], result)
async def google_assistant_list(hass, connection, msg): """List all google assistant entities.""" cloud = hass.data[DOMAIN] entities = google_helpers.async_get_entities(hass, cloud.client.google_config) result = [] for entity in entities: result.append({ 'entity_id': entity.entity_id, 'traits': [trait.name for trait in entity.traits()], 'might_2fa': entity.might_2fa(), }) connection.send_result(msg['id'], result)