1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Allow setting google disable 2fa flag on any entity (#92403)

* Allow setting google disable 2fa flag on any entity

* Fix test

* Include disable_2fa flag in cloud/google_assistant/entities/get
This commit is contained in:
Erik Montnemery
2023-05-03 15:55:38 +02:00
committed by GitHub
parent 20942ab26f
commit 31de1b17e8
10 changed files with 113 additions and 82 deletions

View File

@@ -15,6 +15,7 @@ from homeassistant.components.cloud.prefs import CloudPreferences
from homeassistant.components.homeassistant.exposed_entities import (
DATA_EXPOSED_ENTITIES,
ExposedEntities,
async_expose_entity,
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
@@ -40,8 +41,7 @@ def expose_new(hass, expose_new):
def expose_entity(hass, entity_id, should_expose):
"""Expose an entity to Alexa."""
exposed_entities: ExposedEntities = hass.data[DATA_EXPOSED_ENTITIES]
exposed_entities.async_expose_entity("cloud.alexa", entity_id, should_expose)
async_expose_entity(hass, "cloud.alexa", entity_id, should_expose)
async def test_alexa_config_expose_entity_prefs(