Drop unused Google entity settings from cloud (#89786)

This commit is contained in:
Erik Montnemery 2023-03-16 11:15:38 +01:00 committed by GitHub
parent 273d794f7a
commit f55aaf7664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 16 deletions

View file

@ -12,9 +12,7 @@ PREF_GOOGLE_ENTITY_CONFIGS = "google_entity_configs"
PREF_GOOGLE_REPORT_STATE = "google_report_state"
PREF_ALEXA_ENTITY_CONFIGS = "alexa_entity_configs"
PREF_ALEXA_REPORT_STATE = "alexa_report_state"
PREF_OVERRIDE_NAME = "override_name"
PREF_DISABLE_2FA = "disable_2fa"
PREF_ALIASES = "aliases"
PREF_SHOULD_EXPOSE = "should_expose"
PREF_GOOGLE_LOCAL_WEBHOOK_ID = "google_local_webhook_id"
PREF_USERNAME = "username"

View file

@ -559,8 +559,6 @@ async def google_assistant_list(
"type": "cloud/google_assistant/entities/update",
"entity_id": str,
vol.Optional("should_expose"): vol.Any(None, bool),
vol.Optional("override_name"): str,
vol.Optional("aliases"): [str],
vol.Optional("disable_2fa"): bool,
}
)

View file

@ -18,7 +18,6 @@ from .const import (
PREF_ALEXA_DEFAULT_EXPOSE,
PREF_ALEXA_ENTITY_CONFIGS,
PREF_ALEXA_REPORT_STATE,
PREF_ALIASES,
PREF_CLOUD_USER,
PREF_CLOUDHOOKS,
PREF_DISABLE_2FA,
@ -30,7 +29,6 @@ from .const import (
PREF_GOOGLE_LOCAL_WEBHOOK_ID,
PREF_GOOGLE_REPORT_STATE,
PREF_GOOGLE_SECURE_DEVICES_PIN,
PREF_OVERRIDE_NAME,
PREF_REMOTE_DOMAIN,
PREF_SHOULD_EXPOSE,
PREF_TTS_DEFAULT_VOICE,
@ -118,9 +116,7 @@ class CloudPreferences:
self,
*,
entity_id,
override_name=UNDEFINED,
disable_2fa=UNDEFINED,
aliases=UNDEFINED,
should_expose=UNDEFINED,
):
"""Update config for a Google entity."""
@ -129,9 +125,7 @@ class CloudPreferences:
changes = {}
for key, value in (
(PREF_OVERRIDE_NAME, override_name),
(PREF_DISABLE_2FA, disable_2fa),
(PREF_ALIASES, aliases),
(PREF_SHOULD_EXPOSE, should_expose),
):
if value is not UNDEFINED:

View file

@ -727,8 +727,6 @@ async def test_update_google_entity(
"type": "cloud/google_assistant/entities/update",
"entity_id": "light.kitchen",
"should_expose": False,
"override_name": "updated name",
"aliases": ["lefty", "righty"],
"disable_2fa": False,
}
)
@ -738,8 +736,6 @@ async def test_update_google_entity(
prefs = hass.data[DOMAIN].client.prefs
assert prefs.google_entity_configs["light.kitchen"] == {
"should_expose": False,
"override_name": "updated name",
"aliases": ["lefty", "righty"],
"disable_2fa": False,
}
@ -757,8 +753,6 @@ async def test_update_google_entity(
prefs = hass.data[DOMAIN].client.prefs
assert prefs.google_entity_configs["light.kitchen"] == {
"should_expose": None,
"override_name": "updated name",
"aliases": ["lefty", "righty"],
"disable_2fa": False,
}