From f55aaf7664dbb43cb7c20a72753033d634c581d6 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 16 Mar 2023 11:15:38 +0100 Subject: [PATCH] Drop unused Google entity settings from cloud (#89786) --- homeassistant/components/cloud/const.py | 2 -- homeassistant/components/cloud/http_api.py | 2 -- homeassistant/components/cloud/prefs.py | 6 ------ tests/components/cloud/test_http_api.py | 6 ------ 4 files changed, 16 deletions(-) diff --git a/homeassistant/components/cloud/const.py b/homeassistant/components/cloud/const.py index 9fb4ffc7047..9d5ed2ca28e 100644 --- a/homeassistant/components/cloud/const.py +++ b/homeassistant/components/cloud/const.py @@ -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" diff --git a/homeassistant/components/cloud/http_api.py b/homeassistant/components/cloud/http_api.py index ea1a0aa27e6..6c4115ae28a 100644 --- a/homeassistant/components/cloud/http_api.py +++ b/homeassistant/components/cloud/http_api.py @@ -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, } ) diff --git a/homeassistant/components/cloud/prefs.py b/homeassistant/components/cloud/prefs.py index 17ec00026bc..7f27e7cf39b 100644 --- a/homeassistant/components/cloud/prefs.py +++ b/homeassistant/components/cloud/prefs.py @@ -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: diff --git a/tests/components/cloud/test_http_api.py b/tests/components/cloud/test_http_api.py index c6222314a7f..92c0ca70a17 100644 --- a/tests/components/cloud/test_http_api.py +++ b/tests/components/cloud/test_http_api.py @@ -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, }