diff --git a/.strict-typing b/.strict-typing index 77f85ae03e7def..c7a1b604fac7e5 100644 --- a/.strict-typing +++ b/.strict-typing @@ -147,6 +147,7 @@ homeassistant.components.clicksend.* homeassistant.components.climate.* homeassistant.components.cloud.* homeassistant.components.co2signal.* +homeassistant.components.collection_image.* homeassistant.components.comelit.* homeassistant.components.command_line.* homeassistant.components.compit.* diff --git a/homeassistant/components/air_quality/manifest.json b/homeassistant/components/air_quality/manifest.json index 698265ab35b768..6e08dc4618b9c2 100644 --- a/homeassistant/components/air_quality/manifest.json +++ b/homeassistant/components/air_quality/manifest.json @@ -1,6 +1,6 @@ { "domain": "air_quality", - "name": "Air Quality", + "name": "Air quality", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/air_quality", "integration_type": "entity", diff --git a/homeassistant/components/air_quality/strings.json b/homeassistant/components/air_quality/strings.json index 1fb54ff655fa82..5ae9f82b0079bd 100644 --- a/homeassistant/components/air_quality/strings.json +++ b/homeassistant/components/air_quality/strings.json @@ -276,7 +276,7 @@ "name": "Volatile organic compounds value" } }, - "title": "Air Quality", + "title": "Air quality", "triggers": { "co2_changed": { "description": "Triggers when one or more carbon dioxide levels change.", diff --git a/homeassistant/components/aladdin_connect/__init__.py b/homeassistant/components/aladdin_connect/__init__.py index 1e5cf061a6bd6d..119227505074a5 100644 --- a/homeassistant/components/aladdin_connect/__init__.py +++ b/homeassistant/components/aladdin_connect/__init__.py @@ -16,9 +16,6 @@ config_entry_oauth2_flow, device_registry as dr, ) -from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, -) from . import api from .const import CONFIG_FLOW_MINOR_VERSION, CONFIG_FLOW_VERSION, DOMAIN @@ -31,17 +28,11 @@ async def async_setup_entry( hass: HomeAssistant, entry: AladdinConnectConfigEntry ) -> bool: """Set up Aladdin Connect Genie from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/aladdin_connect/strings.json b/homeassistant/components/aladdin_connect/strings.json index 6a77a7d7a52755..be4e58edde143f 100644 --- a/homeassistant/components/aladdin_connect/strings.json +++ b/homeassistant/components/aladdin_connect/strings.json @@ -29,9 +29,6 @@ "close_door_failed": { "message": "Failed to close the garage door" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "open_door_failed": { "message": "Failed to open the garage door" } diff --git a/homeassistant/components/alarm_control_panel/manifest.json b/homeassistant/components/alarm_control_panel/manifest.json index 5636e8487d78df..fbcf5adfb6ba17 100644 --- a/homeassistant/components/alarm_control_panel/manifest.json +++ b/homeassistant/components/alarm_control_panel/manifest.json @@ -1,6 +1,6 @@ { "domain": "alarm_control_panel", - "name": "Alarm Control Panel", + "name": "Alarm control panel", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/alarm_control_panel", "integration_type": "entity", diff --git a/homeassistant/components/application_credentials/manifest.json b/homeassistant/components/application_credentials/manifest.json index 620aebf2db7b36..80566448af85ed 100644 --- a/homeassistant/components/application_credentials/manifest.json +++ b/homeassistant/components/application_credentials/manifest.json @@ -1,6 +1,6 @@ { "domain": "application_credentials", - "name": "Application Credentials", + "name": "Application credentials", "codeowners": ["@home-assistant/core"], "config_flow": false, "dependencies": ["auth", "websocket_api"], diff --git a/homeassistant/components/application_credentials/strings.json b/homeassistant/components/application_credentials/strings.json index 48d74bc75e42d9..c47b62e99819d3 100644 --- a/homeassistant/components/application_credentials/strings.json +++ b/homeassistant/components/application_credentials/strings.json @@ -1,3 +1,3 @@ { - "title": "Application Credentials" + "title": "Application credentials" } diff --git a/homeassistant/components/august/__init__.py b/homeassistant/components/august/__init__.py index 27d7e71bf5341f..74328139c30a99 100644 --- a/homeassistant/components/august/__init__.py +++ b/homeassistant/components/august/__init__.py @@ -19,7 +19,6 @@ ) from homeassistant.helpers import device_registry as dr, issue_registry as ir from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -40,10 +39,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AugustConfigEntry) -> bo raise ConfigEntryAuthFailed("Migration to OAuth required") session = async_create_august_clientsession(hass) - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady("OAuth implementation not available") from err + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) august_gateway = AugustGateway(Path(hass.config.config_dir), session, oauth_session) try: diff --git a/homeassistant/components/binary_sensor/manifest.json b/homeassistant/components/binary_sensor/manifest.json index 6f54598af41cae..48a7c337dc331a 100644 --- a/homeassistant/components/binary_sensor/manifest.json +++ b/homeassistant/components/binary_sensor/manifest.json @@ -1,6 +1,6 @@ { "domain": "binary_sensor", - "name": "Binary Sensor", + "name": "Binary sensor", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/binary_sensor", "integration_type": "entity", diff --git a/homeassistant/components/collection_image/image.py b/homeassistant/components/collection_image/image.py index 747a4b06d522a3..daac907bb1141a 100644 --- a/homeassistant/components/collection_image/image.py +++ b/homeassistant/components/collection_image/image.py @@ -109,7 +109,7 @@ async def get_random_image(self) -> None: self._attr_available = True await self.update_image(child.media_content_id) - async def update_image(self, image_id: str): + async def update_image(self, image_id: str) -> None: """Update the entity from the image_id.""" self._cached_image = None try: diff --git a/homeassistant/components/collection_image/manifest.json b/homeassistant/components/collection_image/manifest.json index e0c5b6848bf2a4..ee5118b51c804d 100644 --- a/homeassistant/components/collection_image/manifest.json +++ b/homeassistant/components/collection_image/manifest.json @@ -1,6 +1,6 @@ { "domain": "collection_image", - "name": "Collection Image", + "name": "Collection image", "codeowners": ["@karwosts"], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/collection_image", diff --git a/homeassistant/components/collection_image/quality_scale.yaml b/homeassistant/components/collection_image/quality_scale.yaml index 3911ceea56474a..8d1ca9c64efc54 100644 --- a/homeassistant/components/collection_image/quality_scale.yaml +++ b/homeassistant/components/collection_image/quality_scale.yaml @@ -109,4 +109,4 @@ rules: inject-websession: status: exempt comment: No external connections. - strict-typing: todo + strict-typing: done diff --git a/homeassistant/components/collection_image/strings.json b/homeassistant/components/collection_image/strings.json index facf104c02ad47..641a46eb3c96d0 100644 --- a/homeassistant/components/collection_image/strings.json +++ b/homeassistant/components/collection_image/strings.json @@ -28,5 +28,5 @@ "name": "Shuffle" } }, - "title": "Collection Image" + "title": "Collection image" } diff --git a/homeassistant/components/command_line/manifest.json b/homeassistant/components/command_line/manifest.json index 9db9080b53de9b..1d55b9b18dd5d2 100644 --- a/homeassistant/components/command_line/manifest.json +++ b/homeassistant/components/command_line/manifest.json @@ -1,6 +1,6 @@ { "domain": "command_line", - "name": "Command Line", + "name": "Command line", "codeowners": ["@gjohansson-ST"], "documentation": "https://www.home-assistant.io/integrations/command_line", "iot_class": "local_polling", diff --git a/homeassistant/components/device_automation/manifest.json b/homeassistant/components/device_automation/manifest.json index 16587df44c2620..f445bce0ee330c 100644 --- a/homeassistant/components/device_automation/manifest.json +++ b/homeassistant/components/device_automation/manifest.json @@ -1,6 +1,6 @@ { "domain": "device_automation", - "name": "Device Automation", + "name": "Device automation", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/device_automation", "integration_type": "system", diff --git a/homeassistant/components/device_sun_light_trigger/manifest.json b/homeassistant/components/device_sun_light_trigger/manifest.json index 4782fcf4d9b0a7..d787b5fe23e06e 100644 --- a/homeassistant/components/device_sun_light_trigger/manifest.json +++ b/homeassistant/components/device_sun_light_trigger/manifest.json @@ -1,6 +1,6 @@ { "domain": "device_sun_light_trigger", - "name": "Presence-based Lights", + "name": "Presence-based lights", "after_dependencies": ["device_tracker", "group", "light", "person"], "codeowners": [], "documentation": "https://www.home-assistant.io/integrations/device_sun_light_trigger", diff --git a/homeassistant/components/device_tracker/manifest.json b/homeassistant/components/device_tracker/manifest.json index 5fde0fc9fa1699..aea2c5c5e5ae5d 100644 --- a/homeassistant/components/device_tracker/manifest.json +++ b/homeassistant/components/device_tracker/manifest.json @@ -1,6 +1,6 @@ { "domain": "device_tracker", - "name": "Device Tracker", + "name": "Device tracker", "codeowners": ["@home-assistant/core"], "dependencies": ["zone"], "documentation": "https://www.home-assistant.io/integrations/device_tracker", diff --git a/homeassistant/components/dhcp/manifest.json b/homeassistant/components/dhcp/manifest.json index 5f72e9233f1865..3b0e17c5cb7f08 100644 --- a/homeassistant/components/dhcp/manifest.json +++ b/homeassistant/components/dhcp/manifest.json @@ -1,6 +1,6 @@ { "domain": "dhcp", - "name": "DHCP Discovery", + "name": "DHCP discovery", "codeowners": ["@bdraco"], "dependencies": ["network"], "documentation": "https://www.home-assistant.io/integrations/dhcp", diff --git a/homeassistant/components/dropbox/__init__.py b/homeassistant/components/dropbox/__init__.py index 315ece9cea0de3..e6787d96fede1f 100644 --- a/homeassistant/components/dropbox/__init__.py +++ b/homeassistant/components/dropbox/__init__.py @@ -11,7 +11,6 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers import aiohttp_client from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -24,13 +23,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: DropboxConfigEntry) -> bool: """Set up Dropbox from a config entry.""" - try: - oauth2_implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + oauth2_implementation = await async_get_config_entry_implementation(hass, entry) token = entry.data["token"] if not set(token.get("scope", "").split()).issuperset(OAUTH2_SCOPES): diff --git a/homeassistant/components/dropbox/strings.json b/homeassistant/components/dropbox/strings.json index f8d2b3aa22dea8..ebe90c7e84fdd6 100644 --- a/homeassistant/components/dropbox/strings.json +++ b/homeassistant/components/dropbox/strings.json @@ -37,9 +37,6 @@ }, "missing_scopes": { "message": "[%key:component::dropbox::config::step::reauth_permissions::description%]" - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } } } diff --git a/homeassistant/components/file_upload/manifest.json b/homeassistant/components/file_upload/manifest.json index 7e5be2db980716..e0c88842ad769c 100644 --- a/homeassistant/components/file_upload/manifest.json +++ b/homeassistant/components/file_upload/manifest.json @@ -1,6 +1,6 @@ { "domain": "file_upload", - "name": "File Upload", + "name": "File upload", "codeowners": ["@home-assistant/core"], "dependencies": ["http"], "documentation": "https://www.home-assistant.io/integrations/file_upload", diff --git a/homeassistant/components/filesize/manifest.json b/homeassistant/components/filesize/manifest.json index 0c5f544936e7df..daa36d3f68aeab 100644 --- a/homeassistant/components/filesize/manifest.json +++ b/homeassistant/components/filesize/manifest.json @@ -1,6 +1,6 @@ { "domain": "filesize", - "name": "File Size", + "name": "File size", "codeowners": ["@gjohansson-ST"], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/filesize", diff --git a/homeassistant/components/filesize/strings.json b/homeassistant/components/filesize/strings.json index edafdd5192628f..122cc3621c2755 100644 --- a/homeassistant/components/filesize/strings.json +++ b/homeassistant/components/filesize/strings.json @@ -37,5 +37,5 @@ } } }, - "title": "Filesize" + "title": "File size" } diff --git a/homeassistant/components/fitbit/__init__.py b/homeassistant/components/fitbit/__init__.py index 6b4e1cadbf345e..f2378797d8d257 100644 --- a/homeassistant/components/fitbit/__init__.py +++ b/homeassistant/components/fitbit/__init__.py @@ -4,12 +4,9 @@ from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers import config_entry_oauth2_flow -from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, -) from . import api -from .const import DOMAIN, FitbitScope +from .const import FitbitScope from .coordinator import FitbitConfigEntry, FitbitData, FitbitDeviceCoordinator from .exceptions import FitbitApiException, FitbitAuthException from .model import config_from_entry_data @@ -19,17 +16,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: FitbitConfigEntry) -> bool: """Set up fitbit from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) fitbit_api = api.OAuthFitbitApi( hass, session, unit_system=entry.data.get("unit_system") diff --git a/homeassistant/components/fitbit/strings.json b/homeassistant/components/fitbit/strings.json index 2de3e8e0317c69..ebe44522a9de52 100644 --- a/homeassistant/components/fitbit/strings.json +++ b/homeassistant/components/fitbit/strings.json @@ -116,10 +116,5 @@ "name": "Water" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/folder_watcher/manifest.json b/homeassistant/components/folder_watcher/manifest.json index 1f0d9c595eec2b..812ba4785a8c7d 100644 --- a/homeassistant/components/folder_watcher/manifest.json +++ b/homeassistant/components/folder_watcher/manifest.json @@ -1,6 +1,6 @@ { "domain": "folder_watcher", - "name": "Folder Watcher", + "name": "Folder watcher", "codeowners": [], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/folder_watcher", diff --git a/homeassistant/components/frontend/manifest.json b/homeassistant/components/frontend/manifest.json index 19cf273c6f5f60..64401b667edc63 100644 --- a/homeassistant/components/frontend/manifest.json +++ b/homeassistant/components/frontend/manifest.json @@ -1,6 +1,6 @@ { "domain": "frontend", - "name": "Home Assistant Frontend", + "name": "Home Assistant frontend", "codeowners": ["@home-assistant/frontend"], "dependencies": [ "api", diff --git a/homeassistant/components/gentex_homelink/__init__.py b/homeassistant/components/gentex_homelink/__init__.py index f2b4da4d3963db..5dbba5f0958cbd 100644 --- a/homeassistant/components/gentex_homelink/__init__.py +++ b/homeassistant/components/gentex_homelink/__init__.py @@ -5,7 +5,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP, Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady +from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.helpers import aiohttp_client, config_entry_oauth2_flow from . import oauth2 @@ -27,17 +27,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: HomeLinkConfigEntry) -> hass, DOMAIN, auth_implementation ) - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) authenticated_session = oauth2.AsyncConfigEntryAuth( diff --git a/homeassistant/components/gentex_homelink/strings.json b/homeassistant/components/gentex_homelink/strings.json index 73f96423e52a65..e50bb3e633c045 100644 --- a/homeassistant/components/gentex_homelink/strings.json +++ b/homeassistant/components/gentex_homelink/strings.json @@ -41,10 +41,5 @@ } } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/geocaching/__init__.py b/homeassistant/components/geocaching/__init__.py index be9e3c29b93b3e..144249ac42fb06 100644 --- a/homeassistant/components/geocaching/__init__.py +++ b/homeassistant/components/geocaching/__init__.py @@ -2,14 +2,11 @@ from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) -from .const import DOMAIN from .coordinator import GeocachingConfigEntry, GeocachingDataUpdateCoordinator PLATFORMS = [Platform.SENSOR] @@ -17,13 +14,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: GeocachingConfigEntry) -> bool: """Set up Geocaching from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) coordinator = GeocachingDataUpdateCoordinator( diff --git a/homeassistant/components/geocaching/strings.json b/homeassistant/components/geocaching/strings.json index d19a64d5442bd3..95a6eb45298460 100644 --- a/homeassistant/components/geocaching/strings.json +++ b/homeassistant/components/geocaching/strings.json @@ -58,10 +58,5 @@ "unit_of_measurement": "souvenirs" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/google/__init__.py b/homeassistant/components/google/__init__.py index a2f4420e2d38b4..b08f0520c56d03 100644 --- a/homeassistant/components/google/__init__.py +++ b/homeassistant/components/google/__init__.py @@ -28,9 +28,6 @@ ) from homeassistant.helpers import config_entry_oauth2_flow, config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession -from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, -) from homeassistant.helpers.entity import generate_entity_id from .api import ApiAuthImpl, get_feature_access @@ -95,17 +92,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: GoogleConfigEntry) -> bo _LOGGER.error("Configuration error in %s: %s", YAML_DEVICES, str(err)) return False - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) # Force a token refresh to fix a bug where tokens were persisted with # expires_in (relative time delta) and expires_at (absolute time) swapped. diff --git a/homeassistant/components/google/strings.json b/homeassistant/components/google/strings.json index 7e6a9a54cb5594..1dea97c6552ff0 100644 --- a/homeassistant/components/google/strings.json +++ b/homeassistant/components/google/strings.json @@ -48,11 +48,6 @@ } } }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } - }, "options": { "step": { "init": { diff --git a/homeassistant/components/google_assistant_sdk/__init__.py b/homeassistant/components/google_assistant_sdk/__init__.py index e46019670f000f..3b394ed571c39f 100644 --- a/homeassistant/components/google_assistant_sdk/__init__.py +++ b/homeassistant/components/google_assistant_sdk/__init__.py @@ -17,7 +17,6 @@ ) from homeassistant.helpers import config_validation as cv, discovery, intent from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -53,13 +52,7 @@ async def async_setup_entry( hass: HomeAssistant, entry: GoogleAssistantSDKConfigEntry ) -> bool: """Set up Google Assistant SDK from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: await session.async_ensure_token_valid() diff --git a/homeassistant/components/google_assistant_sdk/strings.json b/homeassistant/components/google_assistant_sdk/strings.json index 74ad4a3093170d..1a25fc252a1eac 100644 --- a/homeassistant/components/google_assistant_sdk/strings.json +++ b/homeassistant/components/google_assistant_sdk/strings.json @@ -39,9 +39,6 @@ "grpc_error": { "message": "Failed to communicate with Google Assistant" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "reauth_required": { "message": "Credentials are invalid, re-authentication required" } diff --git a/homeassistant/components/google_drive/__init__.py b/homeassistant/components/google_drive/__init__.py index 9a2bf25c83b151..0a0d9b99e92413 100644 --- a/homeassistant/components/google_drive/__init__.py +++ b/homeassistant/components/google_drive/__init__.py @@ -10,7 +10,6 @@ from homeassistant.helpers import instance_id from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -29,13 +28,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: GoogleDriveConfigEntry) -> bool: """Set up Google Drive from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) auth = AsyncConfigEntryAuth( async_get_clientsession(hass), diff --git a/homeassistant/components/google_drive/strings.json b/homeassistant/components/google_drive/strings.json index 9d26655ee2db92..22766f86f7c8ef 100644 --- a/homeassistant/components/google_drive/strings.json +++ b/homeassistant/components/google_drive/strings.json @@ -67,9 +67,6 @@ }, "invalid_response_google_drive_error": { "message": "Invalid response from Google Drive: {error}" - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } } } diff --git a/homeassistant/components/google_health/__init__.py b/homeassistant/components/google_health/__init__.py index 8001ac637e0de2..8fdff1e552771c 100644 --- a/homeassistant/components/google_health/__init__.py +++ b/homeassistant/components/google_health/__init__.py @@ -10,10 +10,9 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady +from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.helpers import aiohttp_client, device_registry as dr from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -50,13 +49,7 @@ async def async_setup_entry( hass: HomeAssistant, entry: GoogleHealthConfigEntry ) -> bool: """Set up Google Health from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth_error", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/google_health/strings.json b/homeassistant/components/google_health/strings.json index 636be38890517a..9e19fd7b8c8eab 100644 --- a/homeassistant/components/google_health/strings.json +++ b/homeassistant/components/google_health/strings.json @@ -83,9 +83,6 @@ }, "missing_profile_scope": { "message": "Missing required Google Health profile read permission." - }, - "oauth_error": { - "message": "OAuth2 implementation temporarily unavailable." } } } diff --git a/homeassistant/components/google_mail/__init__.py b/homeassistant/components/google_mail/__init__.py index 74d8e222e09fcc..79ffa5d184d570 100644 --- a/homeassistant/components/google_mail/__init__.py +++ b/homeassistant/components/google_mail/__init__.py @@ -3,10 +3,8 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME, Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_validation as cv, discovery from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -34,13 +32,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: GoogleMailConfigEntry) -> bool: """Set up Google Mail from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) auth = AsyncConfigEntryAuth(hass, session) await auth.check_and_refresh_token() diff --git a/homeassistant/components/google_mail/strings.json b/homeassistant/components/google_mail/strings.json index 90ec90d81edcbb..548a3920b3ed08 100644 --- a/homeassistant/components/google_mail/strings.json +++ b/homeassistant/components/google_mail/strings.json @@ -42,9 +42,6 @@ "exceptions": { "missing_from_for_alias": { "message": "Missing 'from' email when setting an alias to show. You have to provide a 'from' email" - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } }, "services": { diff --git a/homeassistant/components/google_photos/__init__.py b/homeassistant/components/google_photos/__init__.py index 69bc38db0365a3..dd2095c694e2a9 100644 --- a/homeassistant/components/google_photos/__init__.py +++ b/homeassistant/components/google_photos/__init__.py @@ -36,17 +36,11 @@ async def async_setup_entry( hass: HomeAssistant, entry: GooglePhotosConfigEntry ) -> bool: """Set up Google Photos from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) web_session = async_get_clientsession(hass) oauth_session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/google_photos/strings.json b/homeassistant/components/google_photos/strings.json index dab54f1fd717c8..838434c0055523 100644 --- a/homeassistant/components/google_photos/strings.json +++ b/homeassistant/components/google_photos/strings.json @@ -59,9 +59,6 @@ "no_access_to_path": { "message": "Cannot read {filename}, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "upload_error": { "message": "Failed to upload content: {message}" } diff --git a/homeassistant/components/google_sheets/__init__.py b/homeassistant/components/google_sheets/__init__.py index 49c9a2b7d84973..869a329afd00a3 100644 --- a/homeassistant/components/google_sheets/__init__.py +++ b/homeassistant/components/google_sheets/__init__.py @@ -13,7 +13,6 @@ ) from homeassistant.helpers import config_validation as cv from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -39,13 +38,7 @@ async def async_setup_entry( hass: HomeAssistant, entry: GoogleSheetsConfigEntry ) -> bool: """Set up Google Sheets from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: await session.async_ensure_token_valid() diff --git a/homeassistant/components/google_sheets/strings.json b/homeassistant/components/google_sheets/strings.json index 74d668fae2dc14..16f5072f675067 100644 --- a/homeassistant/components/google_sheets/strings.json +++ b/homeassistant/components/google_sheets/strings.json @@ -39,9 +39,6 @@ }, "get_failed": { "message": "Failed to retrieve data from the Google Sheets document" - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } }, "services": { diff --git a/homeassistant/components/google_tasks/__init__.py b/homeassistant/components/google_tasks/__init__.py index a8a30c89372ffc..cb0f1038c33b02 100644 --- a/homeassistant/components/google_tasks/__init__.py +++ b/homeassistant/components/google_tasks/__init__.py @@ -28,17 +28,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: GoogleTasksConfigEntry) -> bool: """Set up Google Tasks from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) auth = api.AsyncConfigEntryAuth(hass, session) try: diff --git a/homeassistant/components/google_tasks/strings.json b/homeassistant/components/google_tasks/strings.json index 37e47381821b95..5b69344a6e60c4 100644 --- a/homeassistant/components/google_tasks/strings.json +++ b/homeassistant/components/google_tasks/strings.json @@ -33,10 +33,5 @@ "title": "[%key:common::config_flow::title::reauth%]" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/home_connect/__init__.py b/homeassistant/components/home_connect/__init__.py index c65e96298e019e..414ceac9aedf01 100644 --- a/homeassistant/components/home_connect/__init__.py +++ b/homeassistant/components/home_connect/__init__.py @@ -22,7 +22,6 @@ issue_registry as ir, ) from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -59,13 +58,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: HomeConnectConfigEntry) -> bool: """Set up Home Connect from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/home_connect/strings.json b/homeassistant/components/home_connect/strings.json index a6d266a9a1ecc0..8dc1aed4cb6e90 100644 --- a/homeassistant/components/home_connect/strings.json +++ b/homeassistant/components/home_connect/strings.json @@ -1589,9 +1589,6 @@ "no_program_to_start": { "message": "No program to start" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "pause_program": { "message": "Error pausing program: {error}" }, diff --git a/homeassistant/components/husqvarna_automower/__init__.py b/homeassistant/components/husqvarna_automower/__init__.py index 84df0a5b14b573..6994867f275c20 100644 --- a/homeassistant/components/husqvarna_automower/__init__.py +++ b/homeassistant/components/husqvarna_automower/__init__.py @@ -15,9 +15,6 @@ config_entry_oauth2_flow, config_validation as cv, ) -from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, -) from homeassistant.helpers.typing import ConfigType from homeassistant.util import dt as dt_util @@ -49,17 +46,11 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: AutomowerConfigEntry) -> bool: """Set up this integration using UI.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) api_api = api.AsyncConfigEntryAuth( aiohttp_client.async_get_clientsession(hass), diff --git a/homeassistant/components/husqvarna_automower/strings.json b/homeassistant/components/husqvarna_automower/strings.json index 5674a4f8a5c07e..86514dd7151d36 100644 --- a/homeassistant/components/husqvarna_automower/strings.json +++ b/homeassistant/components/husqvarna_automower/strings.json @@ -482,9 +482,6 @@ "command_send_failed": { "message": "Failed to send command: {exception}" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "work_area_not_existing": { "message": "The selected work area does not exist." }, diff --git a/homeassistant/components/image_processing/manifest.json b/homeassistant/components/image_processing/manifest.json index e41b994320d3e2..89c67e1453d966 100644 --- a/homeassistant/components/image_processing/manifest.json +++ b/homeassistant/components/image_processing/manifest.json @@ -1,6 +1,6 @@ { "domain": "image_processing", - "name": "Image Processing", + "name": "Image processing", "codeowners": ["@home-assistant/core"], "dependencies": ["camera"], "documentation": "https://www.home-assistant.io/integrations/image_processing", diff --git a/homeassistant/components/image_upload/manifest.json b/homeassistant/components/image_upload/manifest.json index ad8824f233009e..538db75f41869b 100644 --- a/homeassistant/components/image_upload/manifest.json +++ b/homeassistant/components/image_upload/manifest.json @@ -1,6 +1,6 @@ { "domain": "image_upload", - "name": "Image Upload", + "name": "Image upload", "codeowners": ["@home-assistant/core"], "config_flow": false, "dependencies": ["http"], diff --git a/homeassistant/components/input_boolean/manifest.json b/homeassistant/components/input_boolean/manifest.json index e5af0ed5a9451e..452fafbd0a85d6 100644 --- a/homeassistant/components/input_boolean/manifest.json +++ b/homeassistant/components/input_boolean/manifest.json @@ -1,6 +1,6 @@ { "domain": "input_boolean", - "name": "Input Boolean", + "name": "Input boolean", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/input_boolean", "integration_type": "helper", diff --git a/homeassistant/components/input_button/manifest.json b/homeassistant/components/input_button/manifest.json index e7d851d876b3b8..217f9b93ed0ded 100644 --- a/homeassistant/components/input_button/manifest.json +++ b/homeassistant/components/input_button/manifest.json @@ -1,6 +1,6 @@ { "domain": "input_button", - "name": "Input Button", + "name": "Input button", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/input_button", "integration_type": "helper", diff --git a/homeassistant/components/input_number/manifest.json b/homeassistant/components/input_number/manifest.json index 89716a63e47800..a60ae43fca9390 100644 --- a/homeassistant/components/input_number/manifest.json +++ b/homeassistant/components/input_number/manifest.json @@ -1,6 +1,6 @@ { "domain": "input_number", - "name": "Input Number", + "name": "Input number", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/input_number", "integration_type": "helper", diff --git a/homeassistant/components/input_select/manifest.json b/homeassistant/components/input_select/manifest.json index 6ae35e67db09ec..7927a7c6eeab45 100644 --- a/homeassistant/components/input_select/manifest.json +++ b/homeassistant/components/input_select/manifest.json @@ -1,6 +1,6 @@ { "domain": "input_select", - "name": "Input Select", + "name": "Input select", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/input_select", "integration_type": "helper", diff --git a/homeassistant/components/input_text/manifest.json b/homeassistant/components/input_text/manifest.json index 4e247aeac14afa..a36d2d2095f5fe 100644 --- a/homeassistant/components/input_text/manifest.json +++ b/homeassistant/components/input_text/manifest.json @@ -1,6 +1,6 @@ { "domain": "input_text", - "name": "Input Text", + "name": "Input text", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/input_text", "integration_type": "helper", diff --git a/homeassistant/components/iotty/__init__.py b/homeassistant/components/iotty/__init__.py index cc7a0867264e40..2565e0c89af360 100644 --- a/homeassistant/components/iotty/__init__.py +++ b/homeassistant/components/iotty/__init__.py @@ -4,14 +4,11 @@ from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) -from .const import DOMAIN from .coordinator import ( IottyConfigEntry, IottyConfigEntryData, @@ -27,13 +24,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: IottyConfigEntry) -> boo """Set up iotty from a config entry.""" _LOGGER.debug("async_setup_entry entry_id=%s", entry.entry_id) - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) data_update_coordinator = IottyDataUpdateCoordinator(hass, entry, session) diff --git a/homeassistant/components/iotty/strings.json b/homeassistant/components/iotty/strings.json index c71c7bb761f918..5ae8b1aca12b72 100644 --- a/homeassistant/components/iotty/strings.json +++ b/homeassistant/components/iotty/strings.json @@ -19,10 +19,5 @@ "title": "[%key:common::config_flow::title::oauth2_pick_implementation%]" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/lawn_mower/manifest.json b/homeassistant/components/lawn_mower/manifest.json index 43418a9440dbde..9c115f84f5002e 100644 --- a/homeassistant/components/lawn_mower/manifest.json +++ b/homeassistant/components/lawn_mower/manifest.json @@ -1,6 +1,6 @@ { "domain": "lawn_mower", - "name": "Lawn Mower", + "name": "Lawn mower", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/lawn_mower", "integration_type": "entity", diff --git a/homeassistant/components/local_calendar/manifest.json b/homeassistant/components/local_calendar/manifest.json index 72420528bbf205..58776c82aaecd4 100644 --- a/homeassistant/components/local_calendar/manifest.json +++ b/homeassistant/components/local_calendar/manifest.json @@ -1,6 +1,6 @@ { "domain": "local_calendar", - "name": "Local Calendar", + "name": "Local calendar", "codeowners": ["@allenporter"], "config_flow": true, "dependencies": ["file_upload"], diff --git a/homeassistant/components/local_calendar/strings.json b/homeassistant/components/local_calendar/strings.json index 77f61c43a7e28f..8e7fb5035dfa1f 100644 --- a/homeassistant/components/local_calendar/strings.json +++ b/homeassistant/components/local_calendar/strings.json @@ -30,5 +30,5 @@ } } }, - "title": "Local Calendar" + "title": "Local calendar" } diff --git a/homeassistant/components/local_file/manifest.json b/homeassistant/components/local_file/manifest.json index 0e6e64d17e5cf9..51cfea993169de 100644 --- a/homeassistant/components/local_file/manifest.json +++ b/homeassistant/components/local_file/manifest.json @@ -1,6 +1,6 @@ { "domain": "local_file", - "name": "Local File", + "name": "Local file", "codeowners": [], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/local_file", diff --git a/homeassistant/components/local_todo/manifest.json b/homeassistant/components/local_todo/manifest.json index eadaeecf2d1f33..622d427924aef1 100644 --- a/homeassistant/components/local_todo/manifest.json +++ b/homeassistant/components/local_todo/manifest.json @@ -1,6 +1,6 @@ { "domain": "local_todo", - "name": "Local To-do", + "name": "Local to-do", "codeowners": ["@allenporter"], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/local_todo", diff --git a/homeassistant/components/local_todo/strings.json b/homeassistant/components/local_todo/strings.json index 9fef14e888680d..20479b4c47eaa2 100644 --- a/homeassistant/components/local_todo/strings.json +++ b/homeassistant/components/local_todo/strings.json @@ -13,5 +13,5 @@ } } }, - "title": "Local To-do" + "title": "Local to-do" } diff --git a/homeassistant/components/lyric/__init__.py b/homeassistant/components/lyric/__init__.py index 6a9a375f8c5d24..92ee401f58c5e9 100644 --- a/homeassistant/components/lyric/__init__.py +++ b/homeassistant/components/lyric/__init__.py @@ -4,7 +4,6 @@ from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import ( aiohttp_client, config_entry_oauth2_flow, @@ -28,17 +27,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: LyricConfigEntry) -> bool: """Set up Honeywell Lyric from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) if not isinstance(implementation, LyricLocalOAuth2Implementation): raise TypeError("Unexpected auth implementation; can't find oauth client id") diff --git a/homeassistant/components/lyric/strings.json b/homeassistant/components/lyric/strings.json index 595ba439e7ad7c..acb780a3878d26 100644 --- a/homeassistant/components/lyric/strings.json +++ b/homeassistant/components/lyric/strings.json @@ -104,9 +104,6 @@ }, "invalid_fan_mode": { "message": "The fan mode {fan_mode} is not supported by this device" - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } }, "services": { diff --git a/homeassistant/components/manual/manifest.json b/homeassistant/components/manual/manifest.json index 37ba45c2ddae4c..9cc5b73dd90ca5 100644 --- a/homeassistant/components/manual/manifest.json +++ b/homeassistant/components/manual/manifest.json @@ -1,6 +1,6 @@ { "domain": "manual", - "name": "Manual Alarm Control Panel", + "name": "Manual alarm control panel", "codeowners": [], "documentation": "https://www.home-assistant.io/integrations/manual", "integration_type": "helper", diff --git a/homeassistant/components/manual_mqtt/manifest.json b/homeassistant/components/manual_mqtt/manifest.json index bf2fccb62ae706..78101cb03267f4 100644 --- a/homeassistant/components/manual_mqtt/manifest.json +++ b/homeassistant/components/manual_mqtt/manifest.json @@ -1,6 +1,6 @@ { "domain": "manual_mqtt", - "name": "Manual MQTT Alarm Control Panel", + "name": "Manual MQTT alarm control panel", "codeowners": [], "dependencies": ["mqtt"], "documentation": "https://www.home-assistant.io/integrations/manual_mqtt", diff --git a/homeassistant/components/mcp/__init__.py b/homeassistant/components/mcp/__init__.py index 573bb7bd758372..d9c05e970d7792 100644 --- a/homeassistant/components/mcp/__init__.py +++ b/homeassistant/components/mcp/__init__.py @@ -6,7 +6,6 @@ from homeassistant.components.application_credentials import AuthorizationServer from homeassistant.const import CONF_ACCESS_TOKEN from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_entry_oauth2_flow, llm from .application_credentials import authorization_server_context @@ -45,13 +44,7 @@ async def _create_token_manager( Returns None if the server does not require authentication. """ - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) if not implementation: return None diff --git a/homeassistant/components/mcp/strings.json b/homeassistant/components/mcp/strings.json index f4a2229fd50869..f35618009143cd 100644 --- a/homeassistant/components/mcp/strings.json +++ b/homeassistant/components/mcp/strings.json @@ -52,10 +52,5 @@ } } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/media_extractor/manifest.json b/homeassistant/components/media_extractor/manifest.json index 91a9d1c983ea95..6abc770947dea0 100644 --- a/homeassistant/components/media_extractor/manifest.json +++ b/homeassistant/components/media_extractor/manifest.json @@ -1,6 +1,6 @@ { "domain": "media_extractor", - "name": "Media Extractor", + "name": "Media extractor", "codeowners": ["@joostlek"], "config_flow": true, "dependencies": ["media_player"], diff --git a/homeassistant/components/media_player/manifest.json b/homeassistant/components/media_player/manifest.json index fa182e314b93d3..ab17db103a74c1 100644 --- a/homeassistant/components/media_player/manifest.json +++ b/homeassistant/components/media_player/manifest.json @@ -1,6 +1,6 @@ { "domain": "media_player", - "name": "Media Player", + "name": "Media player", "codeowners": ["@home-assistant/core"], "dependencies": ["http"], "documentation": "https://www.home-assistant.io/integrations/media_player", diff --git a/homeassistant/components/media_source/manifest.json b/homeassistant/components/media_source/manifest.json index 564f0f9e94f128..ef5840e45f669c 100644 --- a/homeassistant/components/media_source/manifest.json +++ b/homeassistant/components/media_source/manifest.json @@ -1,6 +1,6 @@ { "domain": "media_source", - "name": "Media Source", + "name": "Media source", "codeowners": ["@hunterjm"], "dependencies": ["http"], "documentation": "https://www.home-assistant.io/integrations/media_source", diff --git a/homeassistant/components/melcloud_home/coordinator.py b/homeassistant/components/melcloud_home/coordinator.py index 671463a2c6b74d..a415327eb8c87c 100644 --- a/homeassistant/components/melcloud_home/coordinator.py +++ b/homeassistant/components/melcloud_home/coordinator.py @@ -1,6 +1,7 @@ """Coordinator for MELCloud Home.""" -from collections.abc import Callable +import asyncio +from collections.abc import Callable, Coroutine from dataclasses import dataclass from datetime import datetime, timedelta import logging @@ -213,14 +214,14 @@ async def _async_update_data(self) -> dict[str, float | None]: ) now = utcnow() - energy: dict[str, float | None] = {} + energy_coroutines: dict[str, Coroutine[None, None, float | None]] = {} for building in data.buildings: for ata_unit in building.air_to_air_units: if ( ata_unit.capabilities and ata_unit.capabilities.has_energy_consumed_meter ): - energy[ata_unit.id] = await self._async_get_energy( + energy_coroutines[ata_unit.id] = self._async_get_energy( ata_unit.id, start_of_month, now ) for atw_unit in building.air_to_water_units: @@ -228,8 +229,14 @@ async def _async_update_data(self) -> dict[str, float | None]: atw_unit.capabilities and atw_unit.capabilities.has_energy_consumed_meter ): - energy[atw_unit.id] = await self._async_get_energy( + energy_coroutines[atw_unit.id] = self._async_get_energy( atw_unit.id, start_of_month, now ) - return energy + return dict( + zip( + energy_coroutines, + await asyncio.gather(*energy_coroutines.values()), + strict=True, + ) + ) diff --git a/homeassistant/components/microbees/__init__.py b/homeassistant/components/microbees/__init__.py index f0a39dc0352b36..af5d4aa32c782d 100644 --- a/homeassistant/components/microbees/__init__.py +++ b/homeassistant/components/microbees/__init__.py @@ -13,7 +13,7 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers import config_entry_oauth2_flow -from .const import DOMAIN, PLATFORMS +from .const import PLATFORMS from .coordinator import MicroBeesUpdateCoordinator _LOGGER = logging.getLogger(__name__) @@ -50,17 +50,11 @@ async def async_migrate_entry(hass: HomeAssistant, entry: MicroBeesConfigEntry) async def async_setup_entry(hass: HomeAssistant, entry: MicroBeesConfigEntry) -> bool: """Set up microBees from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/microbees/strings.json b/homeassistant/components/microbees/strings.json index 174624bf0ef806..bbe0922f8512ae 100644 --- a/homeassistant/components/microbees/strings.json +++ b/homeassistant/components/microbees/strings.json @@ -27,10 +27,5 @@ "title": "[%key:common::config_flow::title::oauth2_pick_implementation%]" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/miele/__init__.py b/homeassistant/components/miele/__init__.py index e2740308f6556f..d4c4cff0028a5d 100644 --- a/homeassistant/components/miele/__init__.py +++ b/homeassistant/components/miele/__init__.py @@ -14,7 +14,6 @@ from homeassistant.helpers import config_validation as cv, device_registry as dr from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -54,13 +53,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: MieleConfigEntry) -> bool: """Set up Miele from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) auth = AsyncConfigEntryAuth(async_get_clientsession(hass), session) diff --git a/homeassistant/components/miele/strings.json b/homeassistant/components/miele/strings.json index 33235a7b7979e5..81697d5cc7e045 100644 --- a/homeassistant/components/miele/strings.json +++ b/homeassistant/components/miele/strings.json @@ -1163,9 +1163,6 @@ "invalid_target": { "message": "Invalid device targeted." }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "set_program_error": { "message": "'Set program' action failed: {status} / {message}" }, diff --git a/homeassistant/components/monzo/__init__.py b/homeassistant/components/monzo/__init__.py index 4cd36170f03351..28377e3f3e1828 100644 --- a/homeassistant/components/monzo/__init__.py +++ b/homeassistant/components/monzo/__init__.py @@ -10,7 +10,7 @@ from homeassistant.components.webhook import async_generate_id from homeassistant.const import CONF_ACCESS_TOKEN, CONF_WEBHOOK_ID, Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady, OAuth2TokenRequestError +from homeassistant.exceptions import OAuth2TokenRequestError from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( @@ -95,13 +95,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: MonzoConfigEntry) -> b async def async_setup_entry(hass: HomeAssistant, entry: MonzoConfigEntry) -> bool: """Set up Monzo from a config entry.""" - try: - external_api = await _async_create_api(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + external_api = await _async_create_api(hass, entry) coordinator = MonzoCoordinator(hass, entry, external_api) diff --git a/homeassistant/components/monzo/strings.json b/homeassistant/components/monzo/strings.json index b6630075c2cc94..8fb9ed2109dcf0 100644 --- a/homeassistant/components/monzo/strings.json +++ b/homeassistant/components/monzo/strings.json @@ -88,9 +88,6 @@ "invalid_transfer_account": { "message": "{device_name} does not support pot transfers. Choose a different Monzo account." }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "pot_account_mismatch": { "message": "{pot_name} belongs to {pot_account_name}, not {account_name}. Choose its associated Monzo account, or choose a pot belonging to {account_name}." }, diff --git a/homeassistant/components/mqtt_room/manifest.json b/homeassistant/components/mqtt_room/manifest.json index 858a1cbb98c7cb..63d3ddb656e797 100644 --- a/homeassistant/components/mqtt_room/manifest.json +++ b/homeassistant/components/mqtt_room/manifest.json @@ -1,6 +1,6 @@ { "domain": "mqtt_room", - "name": "MQTT Room Presence", + "name": "MQTT room presence", "codeowners": [], "dependencies": ["mqtt"], "documentation": "https://www.home-assistant.io/integrations/mqtt_room", diff --git a/homeassistant/components/myuplink/__init__.py b/homeassistant/components/myuplink/__init__.py index 7eac3776ce1d18..5c057dbd751d37 100644 --- a/homeassistant/components/myuplink/__init__.py +++ b/homeassistant/components/myuplink/__init__.py @@ -13,7 +13,6 @@ from homeassistant.helpers import device_registry as dr from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -40,13 +39,7 @@ async def async_setup_entry( ) -> bool: """Set up myUplink from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, config_entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, config_entry) session = OAuth2Session(hass, config_entry, implementation) auth = AsyncConfigEntryAuth(async_get_clientsession(hass), session) diff --git a/homeassistant/components/myuplink/strings.json b/homeassistant/components/myuplink/strings.json index 42db3b9d02a2cf..7c370f0e56d078 100644 --- a/homeassistant/components/myuplink/strings.json +++ b/homeassistant/components/myuplink/strings.json @@ -49,9 +49,6 @@ "config_entry_not_ready": { "message": "Error while loading the integration." }, - "implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "incorrect_oauth2_scope": { "message": "Stored permissions are invalid. Please login again to update permissions." }, diff --git a/homeassistant/components/neato/__init__.py b/homeassistant/components/neato/__init__.py index 9ba9164bdbea6a..77a5759be2f79f 100644 --- a/homeassistant/components/neato/__init__.py +++ b/homeassistant/components/neato/__init__.py @@ -17,7 +17,6 @@ ) from homeassistant.helpers import config_validation as cv from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -53,13 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: NeatoConfigEntry) -> boo if CONF_TOKEN not in entry.data: raise ConfigEntryAuthFailed - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/neato/strings.json b/homeassistant/components/neato/strings.json index 0c9ff21262004d..4dd4c2507febe9 100644 --- a/homeassistant/components/neato/strings.json +++ b/homeassistant/components/neato/strings.json @@ -40,11 +40,6 @@ } } }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } - }, "services": { "custom_cleaning": { "description": "Starts a custom cleaning of your house.", diff --git a/homeassistant/components/neopool/manifest.json b/homeassistant/components/neopool/manifest.json index b27be9a9383160..9a3a8e3c1e7121 100644 --- a/homeassistant/components/neopool/manifest.json +++ b/homeassistant/components/neopool/manifest.json @@ -7,6 +7,6 @@ "integration_type": "hub", "iot_class": "local_polling", "loggers": ["neopool_modbus"], - "quality_scale": "silver", + "quality_scale": "platinum", "requirements": ["neopool-modbus==4.6.2"] } diff --git a/homeassistant/components/netatmo/__init__.py b/homeassistant/components/netatmo/__init__.py index 7f073a773bee7c..603935a618d272 100644 --- a/homeassistant/components/netatmo/__init__.py +++ b/homeassistant/components/netatmo/__init__.py @@ -22,7 +22,6 @@ device_registry as dr, ) from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -54,13 +53,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: NetatmoConfigEntry) -> bool: """Set up Netatmo from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) # Set unique id if non was set (migration) if not entry.unique_id: diff --git a/homeassistant/components/netatmo/strings.json b/homeassistant/components/netatmo/strings.json index 2d524b480069da..2cf34d7e1ee0d0 100644 --- a/homeassistant/components/netatmo/strings.json +++ b/homeassistant/components/netatmo/strings.json @@ -156,9 +156,6 @@ "exceptions": { "entry_not_loaded": { "message": "The Netatmo integration is not loaded. Please set it up before calling this action." - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } }, "issues": { diff --git a/homeassistant/components/ondilo_ico/__init__.py b/homeassistant/components/ondilo_ico/__init__.py index 12a856d7360b8e..6c5f4d529b869f 100644 --- a/homeassistant/components/ondilo_ico/__init__.py +++ b/homeassistant/components/ondilo_ico/__init__.py @@ -6,10 +6,8 @@ ) from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_validation as cv from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, async_get_config_entry_implementation, ) from homeassistant.helpers.typing import ConfigType @@ -36,13 +34,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: OndiloIcoConfigEntry) -> bool: """Set up Ondilo ICO from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) coordinator = OndiloIcoPoolsCoordinator( hass, entry, OndiloClient(hass, entry, implementation) diff --git a/homeassistant/components/ondilo_ico/strings.json b/homeassistant/components/ondilo_ico/strings.json index 003ef61bc62fb6..a7415ebd90ea48 100644 --- a/homeassistant/components/ondilo_ico/strings.json +++ b/homeassistant/components/ondilo_ico/strings.json @@ -33,10 +33,5 @@ "name": "TDS" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/onedrive/__init__.py b/homeassistant/components/onedrive/__init__.py index b998f5f2ce722b..3428df1512cf46 100644 --- a/homeassistant/components/onedrive/__init__.py +++ b/homeassistant/components/onedrive/__init__.py @@ -24,7 +24,6 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -171,13 +170,7 @@ async def _get_onedrive_client( hass: HomeAssistant, entry: OneDriveConfigEntry ) -> tuple[OneDriveClient, Callable[[], Awaitable[str]]]: """Get OneDrive client.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) # Refresh up front, so a failure surfaces here instead of from inside the client diff --git a/homeassistant/components/onedrive/strings.json b/homeassistant/components/onedrive/strings.json index 8d889da14c1500..34b098741455a9 100644 --- a/homeassistant/components/onedrive/strings.json +++ b/homeassistant/components/onedrive/strings.json @@ -112,9 +112,6 @@ "no_files_match_pattern": { "message": "No files match the following patterns: {patterns}" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "update_failed": { "message": "Failed to update drive state" }, diff --git a/homeassistant/components/onedrive_for_business/__init__.py b/homeassistant/components/onedrive_for_business/__init__.py index 6f36120c8737da..7ba0281f070570 100644 --- a/homeassistant/components/onedrive_for_business/__init__.py +++ b/homeassistant/components/onedrive_for_business/__init__.py @@ -21,7 +21,6 @@ ) from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -96,13 +95,7 @@ async def _get_onedrive_client( ) -> tuple[OneDriveClient, Callable[[], Awaitable[str]]]: """Get OneDrive client.""" with tenant_id_context(entry.data[CONF_TENANT_ID]): - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) # Refresh up front, so a failure surfaces here instead of from inside the client diff --git a/homeassistant/components/onedrive_for_business/strings.json b/homeassistant/components/onedrive_for_business/strings.json index 06ea2ceb26d05a..dc63e62a9830c5 100644 --- a/homeassistant/components/onedrive_for_business/strings.json +++ b/homeassistant/components/onedrive_for_business/strings.json @@ -94,9 +94,6 @@ "failed_to_get_folder": { "message": "[%key:component::onedrive::exceptions::failed_to_get_folder::message%]" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "update_failed": { "message": "[%key:component::onedrive::exceptions::update_failed::message%]" } diff --git a/homeassistant/components/panel_custom/manifest.json b/homeassistant/components/panel_custom/manifest.json index 1b4bef6bc99edb..aa34b442e563c1 100644 --- a/homeassistant/components/panel_custom/manifest.json +++ b/homeassistant/components/panel_custom/manifest.json @@ -1,6 +1,6 @@ { "domain": "panel_custom", - "name": "Custom Panel", + "name": "Custom panel", "codeowners": ["@home-assistant/frontend"], "dependencies": ["frontend"], "documentation": "https://www.home-assistant.io/integrations/panel_custom", diff --git a/homeassistant/components/point/__init__.py b/homeassistant/components/point/__init__.py index a670f04de403f1..3771e26f59ee3f 100644 --- a/homeassistant/components/point/__init__.py +++ b/homeassistant/components/point/__init__.py @@ -12,7 +12,6 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers import aiohttp_client from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -33,13 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: PointConfigEntry) -> boo if "auth_implementation" not in entry.data: raise ConfigEntryAuthFailed("Authentication failed. Please re-authenticate.") - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) auth = api.AsyncConfigEntryAuth( aiohttp_client.async_get_clientsession(hass), session diff --git a/homeassistant/components/point/strings.json b/homeassistant/components/point/strings.json index 26463e82c4b0b0..9635c32d7c209f 100644 --- a/homeassistant/components/point/strings.json +++ b/homeassistant/components/point/strings.json @@ -26,10 +26,5 @@ "title": "[%key:common::config_flow::title::reauth%]" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/radio_frequency/manifest.json b/homeassistant/components/radio_frequency/manifest.json index e927c14362020f..319ca4b534c754 100644 --- a/homeassistant/components/radio_frequency/manifest.json +++ b/homeassistant/components/radio_frequency/manifest.json @@ -1,6 +1,6 @@ { "domain": "radio_frequency", - "name": "Radio Frequency", + "name": "Radio frequency", "codeowners": ["@home-assistant/core"], "dependencies": ["websocket_api"], "documentation": "https://www.home-assistant.io/integrations/radio_frequency", diff --git a/homeassistant/components/recovery_mode/__init__.py b/homeassistant/components/recovery_mode/__init__.py index 8d02d6044c264f..db3019ce548630 100644 --- a/homeassistant/components/recovery_mode/__init__.py +++ b/homeassistant/components/recovery_mode/__init__.py @@ -18,6 +18,6 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: "Home Assistant is running in recovery mode. Check [the error" " log](/config/logs) to see what went wrong." ), - "Recovery Mode", + "Recovery mode", ) return True diff --git a/homeassistant/components/recovery_mode/manifest.json b/homeassistant/components/recovery_mode/manifest.json index 4323b54ac55cd9..e1ffc232a556c0 100644 --- a/homeassistant/components/recovery_mode/manifest.json +++ b/homeassistant/components/recovery_mode/manifest.json @@ -1,6 +1,6 @@ { "domain": "recovery_mode", - "name": "Recovery Mode", + "name": "Recovery mode", "codeowners": ["@home-assistant/core"], "config_flow": false, "documentation": "https://www.home-assistant.io/integrations/recovery_mode", diff --git a/homeassistant/components/remote_calendar/__init__.py b/homeassistant/components/remote_calendar/__init__.py index 8137fb49eb4bcf..93599d356f94ff 100644 --- a/homeassistant/components/remote_calendar/__init__.py +++ b/homeassistant/components/remote_calendar/__init__.py @@ -1,12 +1,10 @@ """The Remote Calendar integration.""" -# pylint: disable=home-assistant-use-runtime-data # Uses legacy hass.data[DOMAIN] pattern import logging from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from .const import DOMAIN from .coordinator import RemoteCalendarConfigEntry, RemoteCalendarDataUpdateCoordinator _LOGGER = logging.getLogger(__name__) @@ -19,7 +17,6 @@ async def async_setup_entry( hass: HomeAssistant, entry: RemoteCalendarConfigEntry ) -> bool: """Set up Remote Calendar from a config entry.""" - hass.data.setdefault(DOMAIN, {}) coordinator = RemoteCalendarDataUpdateCoordinator(hass, entry) await coordinator.async_config_entry_first_refresh() entry.runtime_data = coordinator diff --git a/homeassistant/components/rss_feed_template/manifest.json b/homeassistant/components/rss_feed_template/manifest.json index 9f1c96ecff26f3..e37d400fabfe66 100644 --- a/homeassistant/components/rss_feed_template/manifest.json +++ b/homeassistant/components/rss_feed_template/manifest.json @@ -1,6 +1,6 @@ { "domain": "rss_feed_template", - "name": "RSS Feed Template", + "name": "RSS feed template", "codeowners": ["@home-assistant/core"], "dependencies": ["http"], "documentation": "https://www.home-assistant.io/integrations/rss_feed_template", diff --git a/homeassistant/components/senz/__init__.py b/homeassistant/components/senz/__init__.py index d3ab6503b3ee9a..42747b6cf3cd38 100644 --- a/homeassistant/components/senz/__init__.py +++ b/homeassistant/components/senz/__init__.py @@ -13,7 +13,6 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers import config_validation as cv, httpx_client from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -31,13 +30,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SENZConfigEntry) -> bool: """Set up SENZ from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) auth = SENZConfigEntryAuth(httpx_client.get_async_client(hass), session) senz_api = SENZAPI(auth) diff --git a/homeassistant/components/senz/strings.json b/homeassistant/components/senz/strings.json index 35564e0e156f43..47600a4ebe3709 100644 --- a/homeassistant/components/senz/strings.json +++ b/homeassistant/components/senz/strings.json @@ -34,9 +34,6 @@ "config_entry_not_ready": { "message": "Error while loading the integration." }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "set_attribute_error": { "message": "Failed to set {attribute} on the device." } diff --git a/homeassistant/components/shopping_list/__init__.py b/homeassistant/components/shopping_list/__init__.py index a2527f5d8307ea..2d4bbf324b92a7 100644 --- a/homeassistant/components/shopping_list/__init__.py +++ b/homeassistant/components/shopping_list/__init__.py @@ -58,7 +58,7 @@ async def _async_setup(hass: HomeAssistant) -> None: translation_key="deprecated_yaml", translation_placeholders={ "domain": DOMAIN, - "integration_title": "Shopping List", + "integration_title": "Shopping list", }, ) diff --git a/homeassistant/components/shopping_list/manifest.json b/homeassistant/components/shopping_list/manifest.json index 12dfd238fce221..540ed8fe8c8651 100644 --- a/homeassistant/components/shopping_list/manifest.json +++ b/homeassistant/components/shopping_list/manifest.json @@ -1,6 +1,6 @@ { "domain": "shopping_list", - "name": "Shopping List", + "name": "Shopping list", "codeowners": [], "config_flow": true, "dependencies": ["http"], diff --git a/homeassistant/components/shopping_list/strings.json b/homeassistant/components/shopping_list/strings.json index 6c4fe93234fe0a..d7daa3f954309d 100644 --- a/homeassistant/components/shopping_list/strings.json +++ b/homeassistant/components/shopping_list/strings.json @@ -81,5 +81,5 @@ "name": "Sort shopping list" } }, - "title": "Shopping List" + "title": "Shopping list" } diff --git a/homeassistant/components/smappee/__init__.py b/homeassistant/components/smappee/__init__.py index 4289b9bd2f9ea7..3887a0babfd594 100644 --- a/homeassistant/components/smappee/__init__.py +++ b/homeassistant/components/smappee/__init__.py @@ -12,7 +12,6 @@ CONF_PLATFORM, ) from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_entry_oauth2_flow, config_validation as cv from homeassistant.helpers.typing import ConfigType from homeassistant.util import Throttle @@ -96,17 +95,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: SmappeeConfigEntry) -> b ) await hass.async_add_executor_job(smappee.load_local_service_location) else: - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + ) smappee_api = api.ConfigEntrySmappeeApi(hass, entry, implementation) diff --git a/homeassistant/components/smappee/strings.json b/homeassistant/components/smappee/strings.json index b6e952a3474ee9..d4197c78c40b5e 100644 --- a/homeassistant/components/smappee/strings.json +++ b/homeassistant/components/smappee/strings.json @@ -36,10 +36,5 @@ "title": "Discovered Smappee device" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/smartthings/__init__.py b/homeassistant/components/smartthings/__init__.py index f7ad18bb531ba9..df3d8b0986a5b2 100644 --- a/homeassistant/components/smartthings/__init__.py +++ b/homeassistant/components/smartthings/__init__.py @@ -58,7 +58,6 @@ from homeassistant.helpers import device_registry as dr, entity_registry as er from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -134,13 +133,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SmartThingsConfigEntry) # after migration but still require reauthentication if CONF_TOKEN not in entry.data: raise ConfigEntryAuthFailed("Config entry missing token") - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index 7db88dcd85aa79..8948c15fe17bd6 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -1146,9 +1146,6 @@ } }, "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "remote_control_status": { "message": "Can only be changed when remote control is enabled" } diff --git a/homeassistant/components/spotify/__init__.py b/homeassistant/components/spotify/__init__.py index 1f585730c9593f..7d11ab09968790 100644 --- a/homeassistant/components/spotify/__init__.py +++ b/homeassistant/components/spotify/__init__.py @@ -10,7 +10,6 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -42,13 +41,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SpotifyConfigEntry) -> bool: """Set up Spotify from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/spotify/strings.json b/homeassistant/components/spotify/strings.json index 71493246e4cfa1..98ac05f0bddb44 100644 --- a/homeassistant/components/spotify/strings.json +++ b/homeassistant/components/spotify/strings.json @@ -30,11 +30,6 @@ } } }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } - }, "issues": { "user_not_premium": { "description": "[%key:component::spotify::config::abort::user_not_premium%]", diff --git a/homeassistant/components/systemmonitor/manifest.json b/homeassistant/components/systemmonitor/manifest.json index 444d5fb9596e71..0f25f8b782b55c 100644 --- a/homeassistant/components/systemmonitor/manifest.json +++ b/homeassistant/components/systemmonitor/manifest.json @@ -1,6 +1,6 @@ { "domain": "systemmonitor", - "name": "System Monitor", + "name": "System monitor", "codeowners": ["@gjohansson-ST"], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/systemmonitor", diff --git a/homeassistant/components/tesla_fleet/__init__.py b/homeassistant/components/tesla_fleet/__init__.py index d450d1fd166971..be1b0ef2b39c3f 100644 --- a/homeassistant/components/tesla_fleet/__init__.py +++ b/homeassistant/components/tesla_fleet/__init__.py @@ -27,7 +27,6 @@ from homeassistant.helpers import config_validation as cv, device_registry as dr from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -108,19 +107,7 @@ async def _async_get_products(tesla: TeslaFleetApi) -> list[dict]: async def async_setup_entry(hass: HomeAssistant, entry: TeslaFleetConfigEntry) -> bool: """Set up TeslaFleet config.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err - except ValueError as e: - # Remove invalid implementation from config entry then raise AuthFailed - hass.config_entries.async_update_entry( - entry, data={"auth_implementation": None} - ) - raise ConfigEntryAuthFailed from e + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/tesla_fleet/strings.json b/homeassistant/components/tesla_fleet/strings.json index 5ef019db9eb983..b79f9f5129ec2f 100644 --- a/homeassistant/components/tesla_fleet/strings.json +++ b/homeassistant/components/tesla_fleet/strings.json @@ -636,9 +636,6 @@ "no_cable": { "message": "Charge cable will lock automatically when connected" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "update_failed": { "message": "{endpoint} data request failed: {message}" }, diff --git a/homeassistant/components/teslemetry/__init__.py b/homeassistant/components/teslemetry/__init__.py index f51bcb69d81012..088f9dd791691a 100644 --- a/homeassistant/components/teslemetry/__init__.py +++ b/homeassistant/components/teslemetry/__init__.py @@ -38,7 +38,6 @@ ) from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -270,13 +269,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: TeslemetryConfigEntry) - translation_key="token_data_malformed", ) - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryAuthFailed( - translation_domain=DOMAIN, - translation_key="oauth_implementation_not_available", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) session = async_get_clientsession(hass) diff --git a/homeassistant/components/teslemetry/strings.json b/homeassistant/components/teslemetry/strings.json index d6392a764885f2..fa830604871d4d 100644 --- a/homeassistant/components/teslemetry/strings.json +++ b/homeassistant/components/teslemetry/strings.json @@ -1183,9 +1183,6 @@ "not_ready_connection_error": { "message": "Unable to connect to Teslemetry" }, - "oauth_implementation_not_available": { - "message": "OAuth implementation not available, try reauthenticating" - }, "set_scheduled_charging_time": { "message": "Scheduled charging time is required when enabling" }, diff --git a/homeassistant/components/tibber/__init__.py b/homeassistant/components/tibber/__init__.py index 5e49f4d0f8276f..750d20ceac9bca 100644 --- a/homeassistant/components/tibber/__init__.py +++ b/homeassistant/components/tibber/__init__.py @@ -20,7 +20,6 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -114,13 +113,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: TibberConfigEntry) -> bo translation_key="data_api_reauth_required", ) - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/tibber/strings.json b/homeassistant/components/tibber/strings.json index 3f03653b2b3d05..93abe359cb0d87 100644 --- a/homeassistant/components/tibber/strings.json +++ b/homeassistant/components/tibber/strings.json @@ -249,9 +249,6 @@ "no_config_entry": { "message": "No Tibber integration configured" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "send_message_timeout": { "message": "Timeout sending message with Tibber" } diff --git a/homeassistant/components/toon/__init__.py b/homeassistant/components/toon/__init__.py index 212aa2e28bbe87..6edfd235051692 100644 --- a/homeassistant/components/toon/__init__.py +++ b/homeassistant/components/toon/__init__.py @@ -11,10 +11,8 @@ Platform, ) from homeassistant.core import CoreState, HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_validation as cv, device_registry as dr from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -96,13 +94,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ToonConfigEntry) -> bool: """Set up Toon from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) coordinator = ToonDataUpdateCoordinator(hass, entry, session) diff --git a/homeassistant/components/toon/strings.json b/homeassistant/components/toon/strings.json index ea79172f024c66..8fd0a1c6daeb78 100644 --- a/homeassistant/components/toon/strings.json +++ b/homeassistant/components/toon/strings.json @@ -32,9 +32,6 @@ }, "invalid_response": { "message": "Received an invalid response from the Toon device." - }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" } } } diff --git a/homeassistant/components/twitch/__init__.py b/homeassistant/components/twitch/__init__.py index 862b7a8470cb69..aeb15e97916245 100644 --- a/homeassistant/components/twitch/__init__.py +++ b/homeassistant/components/twitch/__init__.py @@ -14,28 +14,21 @@ OAuth2TokenRequestReauthError, ) from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, LocalOAuth2Implementation, OAuth2Session, async_get_config_entry_implementation, ) -from .const import DOMAIN, OAUTH_SCOPES, PLATFORMS +from .const import OAUTH_SCOPES, PLATFORMS from .coordinator import TwitchConfigEntry, TwitchCoordinator async def async_setup_entry(hass: HomeAssistant, entry: TwitchConfigEntry) -> bool: """Set up Twitch from a config entry.""" - try: - implementation = cast( - LocalOAuth2Implementation, - await async_get_config_entry_implementation(hass, entry), - ) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = cast( + LocalOAuth2Implementation, + await async_get_config_entry_implementation(hass, entry), + ) session = OAuth2Session(hass, entry, implementation) try: await session.async_ensure_token_valid() diff --git a/homeassistant/components/twitch/strings.json b/homeassistant/components/twitch/strings.json index 92c239d4606c6f..93372966b89c12 100644 --- a/homeassistant/components/twitch/strings.json +++ b/homeassistant/components/twitch/strings.json @@ -57,10 +57,5 @@ } } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/vicare/__init__.py b/homeassistant/components/vicare/__init__.py index 931040dda1900b..9753687ecb3c33 100644 --- a/homeassistant/components/vicare/__init__.py +++ b/homeassistant/components/vicare/__init__.py @@ -130,21 +130,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ViCareConfigEntry) -> bo """Set up from config entry.""" _LOGGER.debug("Setting up ViCare component") - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except ( - config_entry_oauth2_flow.ImplementationUnavailableError, - ValueError, - ) as err: - # Application Credentials missing or removed — user must re-authenticate - _LOGGER.debug("OAuth2 implementation unavailable: %s", err) - raise ConfigEntryAuthFailed( - "OAuth2 implementation unavailable, please re-authenticate" - ) from err + ) oauth_session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/vizio/manifest.json b/homeassistant/components/vizio/manifest.json index 4689740605f858..b4290f5d4a05e0 100644 --- a/homeassistant/components/vizio/manifest.json +++ b/homeassistant/components/vizio/manifest.json @@ -7,6 +7,6 @@ "integration_type": "device", "iot_class": "local_polling", "loggers": ["vizaio"], - "requirements": ["vizaio==0.5.0"], + "requirements": ["vizaio==0.6.1"], "zeroconf": ["_viziocast._tcp.local."] } diff --git a/homeassistant/components/volvo/__init__.py b/homeassistant/components/volvo/__init__.py index 00bb342c9dd8c2..5808641ab7676d 100644 --- a/homeassistant/components/volvo/__init__.py +++ b/homeassistant/components/volvo/__init__.py @@ -15,7 +15,6 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -89,13 +88,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: VolvoConfigEntry) -> bo async def _async_auth_and_create_api( hass: HomeAssistant, entry: VolvoConfigEntry ) -> VolvoCarsApi: - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) web_session = async_get_clientsession(hass) auth = VolvoAuth(web_session, oauth_session) diff --git a/homeassistant/components/volvo/strings.json b/homeassistant/components/volvo/strings.json index 5f5204d3cc4263..f9280c242a831b 100644 --- a/homeassistant/components/volvo/strings.json +++ b/homeassistant/components/volvo/strings.json @@ -365,9 +365,6 @@ "no_vehicle": { "message": "Unable to retrieve vehicle details." }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "unauthorized": { "message": "Authentication failed. {message}" }, diff --git a/homeassistant/components/water_heater/manifest.json b/homeassistant/components/water_heater/manifest.json index 96629906ccecec..96a663e5c330a5 100644 --- a/homeassistant/components/water_heater/manifest.json +++ b/homeassistant/components/water_heater/manifest.json @@ -1,6 +1,6 @@ { "domain": "water_heater", - "name": "Water Heater", + "name": "Water heater", "codeowners": ["@home-assistant/core"], "documentation": "https://www.home-assistant.io/integrations/water_heater", "integration_type": "entity", diff --git a/homeassistant/components/watts/__init__.py b/homeassistant/components/watts/__init__.py index 3dbb42371de5d6..6ab432ec5a2235 100644 --- a/homeassistant/components/watts/__init__.py +++ b/homeassistant/components/watts/__init__.py @@ -99,17 +99,11 @@ def _handle_new_devices( async def async_setup_entry(hass: HomeAssistant, entry: WattsVisionConfigEntry) -> bool: """Set up Watts Vision from a config entry.""" - try: - implementation = ( - await config_entry_oauth2_flow.async_get_config_entry_implementation( - hass, entry - ) + implementation = ( + await config_entry_oauth2_flow.async_get_config_entry_implementation( + hass, entry ) - except config_entry_oauth2_flow.ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth_implementation_unavailable", - ) from err + ) oauth_session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/watts/strings.json b/homeassistant/components/watts/strings.json index e35e258bde0d98..1ecac929bc7b03 100644 --- a/homeassistant/components/watts/strings.json +++ b/homeassistant/components/watts/strings.json @@ -58,9 +58,6 @@ "network_issue": { "message": "Network issue during OAuth setup" }, - "oauth_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "oauth_session_not_valid": { "message": "OAuth session not valid" }, diff --git a/homeassistant/components/weheat/__init__.py b/homeassistant/components/weheat/__init__.py index f7d5ffafdb8153..254d4d17ed1371 100644 --- a/homeassistant/components/weheat/__init__.py +++ b/homeassistant/components/weheat/__init__.py @@ -12,12 +12,11 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) -from .const import API_URL, DOMAIN, LOGGER +from .const import API_URL, LOGGER from .coordinator import ( HeatPumpInfo, WeheatConfigEntry, @@ -31,13 +30,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: WeheatConfigEntry) -> bool: """Set up Weheat from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/weheat/strings.json b/homeassistant/components/weheat/strings.json index 4a51c8eadc0385..b2a50174e14782 100644 --- a/homeassistant/components/weheat/strings.json +++ b/homeassistant/components/weheat/strings.json @@ -144,10 +144,5 @@ "name": "Water outlet temperature" } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/withings/__init__.py b/homeassistant/components/withings/__init__.py index c17025159e40b3..f4be335a45f719 100644 --- a/homeassistant/components/withings/__init__.py +++ b/homeassistant/components/withings/__init__.py @@ -41,11 +41,9 @@ Platform, ) from homeassistant.core import CALLBACK_TYPE, HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import device_registry as dr from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -113,13 +111,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: WithingsConfigEntry) -> ) session = async_get_clientsession(hass) client = WithingsClient(session=session) - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) refresh_lock = asyncio.Lock() diff --git a/homeassistant/components/withings/strings.json b/homeassistant/components/withings/strings.json index 2fa3734f2fc649..71d9bb272f8733 100644 --- a/homeassistant/components/withings/strings.json +++ b/homeassistant/components/withings/strings.json @@ -328,10 +328,5 @@ } } } - }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } } } diff --git a/homeassistant/components/xbox/__init__.py b/homeassistant/components/xbox/__init__.py index 277471c9c8b4de..b6d6bcc8c0927a 100644 --- a/homeassistant/components/xbox/__init__.py +++ b/homeassistant/components/xbox/__init__.py @@ -12,7 +12,6 @@ from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_validation as cv, device_registry as dr from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -45,13 +44,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: XboxConfigEntry) -> bool: """Set up xbox from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as e: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from e + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) async_session = get_async_client(hass) @@ -113,13 +106,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: XboxConfigEntry) -> bo """Migrate config entry.""" if entry.version == 1 and entry.minor_version < 3: - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as e: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from e + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) async_session = get_async_client(hass) auth = AsyncConfigEntryAuth(async_session, session) diff --git a/homeassistant/components/xbox/strings.json b/homeassistant/components/xbox/strings.json index 9d7aa6bf8250f3..384972aa7bec89 100644 --- a/homeassistant/components/xbox/strings.json +++ b/homeassistant/components/xbox/strings.json @@ -160,9 +160,6 @@ "media_not_found": { "message": "The requested media could not be found." }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "request_exception": { "message": "Failed to connect to Xbox Network" }, diff --git a/homeassistant/components/yale/__init__.py b/homeassistant/components/yale/__init__.py index 49bc3850c24c45..e1a7bda85c4c0e 100644 --- a/homeassistant/components/yale/__init__.py +++ b/homeassistant/components/yale/__init__.py @@ -21,7 +21,6 @@ ) from homeassistant.helpers import device_registry as dr from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -37,10 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: YaleConfigEntry) -> bool: """Set up Yale from a config entry.""" session = async_create_yale_clientsession(hass) - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady("OAuth implementation not available") from err + implementation = await async_get_config_entry_implementation(hass, entry) oauth_session = OAuth2Session(hass, entry, implementation) yale_gateway = YaleGateway(Path(hass.config.config_dir), session, oauth_session) try: diff --git a/homeassistant/components/yolink/__init__.py b/homeassistant/components/yolink/__init__.py index d491799b356107..595286d2207eb1 100644 --- a/homeassistant/components/yolink/__init__.py +++ b/homeassistant/components/yolink/__init__.py @@ -20,7 +20,6 @@ device_registry as dr, ) from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -108,13 +107,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: YoLinkConfigEntry) -> bool: """Set up yolink from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) diff --git a/homeassistant/components/yolink/strings.json b/homeassistant/components/yolink/strings.json index 840733240e41fa..479908c15e0e11 100644 --- a/homeassistant/components/yolink/strings.json +++ b/homeassistant/components/yolink/strings.json @@ -129,9 +129,6 @@ "invalid_config_entry": { "message": "Config entry not found or not loaded!" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "valve_inoperable_currently": { "message": "The Valve cannot be operated currently." } diff --git a/homeassistant/components/yoto/__init__.py b/homeassistant/components/yoto/__init__.py index 1f068d64cc82c8..e20d0cbad886f9 100644 --- a/homeassistant/components/yoto/__init__.py +++ b/homeassistant/components/yoto/__init__.py @@ -11,7 +11,6 @@ OAuth2TokenRequestReauthError, ) from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -32,13 +31,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: YotoConfigEntry) -> bool: """Set up Yoto from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) try: diff --git a/homeassistant/components/yoto/strings.json b/homeassistant/components/yoto/strings.json index cb832fd390fd29..154704c916c544 100644 --- a/homeassistant/components/yoto/strings.json +++ b/homeassistant/components/yoto/strings.json @@ -136,9 +136,6 @@ "invalid_media_id": { "message": "Not a Yoto media identifier: {media_id}" }, - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - }, "play_failed": { "message": "Failed to play Yoto media: {error}" }, diff --git a/homeassistant/components/youtube/__init__.py b/homeassistant/components/youtube/__init__.py index b6f12c7efc9c7e..a4a494442a55fe 100644 --- a/homeassistant/components/youtube/__init__.py +++ b/homeassistant/components/youtube/__init__.py @@ -12,13 +12,11 @@ ) from homeassistant.helpers import device_registry as dr from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) from .api import AsyncConfigEntryAuth -from .const import DOMAIN from .coordinator import YouTubeConfigEntry, YouTubeDataUpdateCoordinator PLATFORMS = [Platform.SENSOR] @@ -26,13 +24,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: YouTubeConfigEntry) -> bool: """Set up YouTube from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - translation_domain=DOMAIN, - translation_key="oauth2_implementation_unavailable", - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) auth = AsyncConfigEntryAuth(hass, session) try: diff --git a/homeassistant/components/youtube/strings.json b/homeassistant/components/youtube/strings.json index eb8fb14c445870..a4cdc32a49506b 100644 --- a/homeassistant/components/youtube/strings.json +++ b/homeassistant/components/youtube/strings.json @@ -55,11 +55,6 @@ "views": { "name": "Views" } } }, - "exceptions": { - "oauth2_implementation_unavailable": { - "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" - } - }, "options": { "step": { "init": { diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index 7f190a8098fb06..9affa7ef0cc5d4 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -1175,7 +1175,7 @@ "iot_class": "local_push" }, "command_line": { - "name": "Command Line", + "name": "Command line", "integration_type": "hub", "config_flow": false, "iot_class": "local_polling" @@ -1383,7 +1383,7 @@ "iot_class": "local_polling" }, "device_sun_light_trigger": { - "name": "Presence-based Lights", + "name": "Presence-based lights", "integration_type": "hub", "config_flow": false, "iot_class": "calculated" @@ -2249,7 +2249,7 @@ "iot_class": "local_polling" }, "folder_watcher": { - "name": "Folder Watcher", + "name": "Folder watcher", "integration_type": "hub", "config_flow": true, "iot_class": "local_polling" @@ -4063,7 +4063,7 @@ "iot_class": "local_polling" }, "local_file": { - "name": "Local File", + "name": "Local file", "integration_type": "hub", "config_flow": true, "iot_class": "local_polling" @@ -4291,7 +4291,7 @@ "iot_class": "local_polling" }, "media_extractor": { - "name": "Media Extractor", + "name": "Media extractor", "integration_type": "hub", "config_flow": true, "iot_class": "calculated", @@ -4653,7 +4653,7 @@ "integration_type": "hub", "config_flow": false, "iot_class": "local_push", - "name": "Manual MQTT Alarm Control Panel" + "name": "Manual MQTT alarm control panel" }, "mqtt": { "integration_type": "service", @@ -4677,7 +4677,7 @@ "integration_type": "hub", "config_flow": false, "iot_class": "local_push", - "name": "MQTT Room Presence" + "name": "MQTT room presence" }, "mqtt_statestream": { "integration_type": "hub", @@ -6244,7 +6244,7 @@ "iot_class": "cloud_polling" }, "rss_feed_template": { - "name": "RSS Feed Template", + "name": "RSS feed template", "integration_type": "hub", "config_flow": false, "iot_class": "local_push" @@ -7209,7 +7209,7 @@ "iot_class": "local_push" }, "systemmonitor": { - "name": "System Monitor", + "name": "System monitor", "integration_type": "hub", "config_flow": true, "iot_class": "local_push", @@ -8648,7 +8648,7 @@ "iot_class": "local_push" }, "manual": { - "name": "Manual Alarm Control Panel", + "name": "Manual alarm control panel", "integration_type": "helper", "config_flow": false, "iot_class": "calculated" diff --git a/mypy.ini b/mypy.ini index 45920e6fcb7843..55d9509291bce8 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1227,6 +1227,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.collection_image.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.comelit.*] check_untyped_defs = true disallow_incomplete_defs = true diff --git a/requirements_all.txt b/requirements_all.txt index f15f9874fee09f..5fc9c2cc5e16b5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -3391,7 +3391,7 @@ vilfo-api-client==0.5.0 visionpluspython==1.1.0 # homeassistant.components.vizio -vizaio==0.5.0 +vizaio==0.6.1 # homeassistant.components.caldav vobject==0.9.9 diff --git a/script/hassfest/translations.py b/script/hassfest/translations.py index aaba675fa337a9..ba358a0c9f5d5a 100644 --- a/script/hassfest/translations.py +++ b/script/hassfest/translations.py @@ -37,6 +37,7 @@ "emulated_roku", "energenie_power_sockets", "faa_delays", + "filesize", "garages_amsterdam", "generic", "google_travel_time", diff --git a/script/scaffold/templates/config_flow_oauth2/integration/__init__.py b/script/scaffold/templates/config_flow_oauth2/integration/__init__.py index 4b3837034401b7..77950552d6e251 100644 --- a/script/scaffold/templates/config_flow_oauth2/integration/__init__.py +++ b/script/scaffold/templates/config_flow_oauth2/integration/__init__.py @@ -3,10 +3,8 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import aiohttp_client from homeassistant.helpers.config_entry_oauth2_flow import ( - ImplementationUnavailableError, OAuth2Session, async_get_config_entry_implementation, ) @@ -25,12 +23,7 @@ # # TODO Update entry annotation async def async_setup_entry(hass: HomeAssistant, entry: New_NameConfigEntry) -> bool: """Set up NEW_NAME from a config entry.""" - try: - implementation = await async_get_config_entry_implementation(hass, entry) - except ImplementationUnavailableError as err: - raise ConfigEntryNotReady( - "OAuth2 implementation temporarily unavailable, will retry" - ) from err + implementation = await async_get_config_entry_implementation(hass, entry) session = OAuth2Session(hass, entry, implementation) diff --git a/tests/components/cloud/snapshots/test_http_api.ambr b/tests/components/cloud/snapshots/test_http_api.ambr index 72b13befc4ce41..8be82b31bc8c14 100644 --- a/tests/components/cloud/snapshots/test_http_api.ambr +++ b/tests/components/cloud/snapshots/test_http_api.ambr @@ -30,7 +30,7 @@ --- | --- ai_task | AI Task auth | Auth - binary_sensor | Binary Sensor + binary_sensor | Binary sensor cloud | Home Assistant Cloud cloud.ai_task | Unknown cloud.binary_sensor | Unknown @@ -43,7 +43,7 @@ http | HTTP intent | Intent llm | LLM - media_source | Media Source + media_source | Media source mock_no_info_integration | mock_no_info_integration repairs | Repairs stt | Speech-to-text (STT) @@ -166,7 +166,7 @@ --- | --- ai_task | AI Task auth | Auth - binary_sensor | Binary Sensor + binary_sensor | Binary sensor cloud | Home Assistant Cloud cloud.ai_task | Unknown cloud.binary_sensor | Unknown @@ -179,7 +179,7 @@ http | HTTP intent | Intent llm | LLM - media_source | Media Source + media_source | Media source mock_no_info_integration | mock_no_info_integration repairs | Repairs stt | Speech-to-text (STT) diff --git a/tests/components/conversation/test_trace.py b/tests/components/conversation/test_trace.py index 46a280175e42fb..b3fef64faffdd1 100644 --- a/tests/components/conversation/test_trace.py +++ b/tests/components/conversation/test_trace.py @@ -55,7 +55,7 @@ async def test_converation_trace( assert trace_event.get("data") == { "intent_name": "HassListAddItem", "slots": { - "name": "Shopping List", + "name": "Shopping list", "item": "apples", }, } diff --git a/tests/components/melcloud_home/test_init.py b/tests/components/melcloud_home/test_init.py index b07541dc390535..5049dae794e00a 100644 --- a/tests/components/melcloud_home/test_init.py +++ b/tests/components/melcloud_home/test_init.py @@ -224,7 +224,7 @@ async def test_energy_update_cycle_fails( mock_melcloud_client.get_energy_telemetry.side_effect = exception freezer.tick(ENERGY_UPDATE_INTERVAL) async_fire_time_changed(hass) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) assert energy_coordinator.data["ata-unit-uuid-1"] is None assert energy_coordinator.data["atw-unit-uuid-1"] is None @@ -233,7 +233,7 @@ async def test_energy_update_cycle_fails( mock_melcloud_client.get_energy_telemetry.side_effect = None freezer.tick(ENERGY_UPDATE_INTERVAL) async_fire_time_changed(hass) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) assert energy_coordinator.data["ata-unit-uuid-1"] is not None assert energy_coordinator.data["atw-unit-uuid-1"] is not None diff --git a/tests/components/youtube/__init__.py b/tests/components/youtube/__init__.py index 56c5dcd7226bfc..65e03b44f03009 100644 --- a/tests/components/youtube/__init__.py +++ b/tests/components/youtube/__init__.py @@ -5,7 +5,7 @@ from youtubeaio.models import YouTubeChannel, YouTubePlaylistItem, YouTubeSubscription from youtubeaio.types import AuthScope -from homeassistant.components.youtube import DOMAIN +from homeassistant.components.youtube.const import DOMAIN from homeassistant.core import HomeAssistant from tests.common import async_load_json_object_fixture diff --git a/tests/components/youtube/test_init.py b/tests/components/youtube/test_init.py index bbcb86fc424efd..58c13b634d3e9e 100644 --- a/tests/components/youtube/test_init.py +++ b/tests/components/youtube/test_init.py @@ -7,8 +7,7 @@ from aiohttp.client_exceptions import ClientError import pytest -from homeassistant.components.youtube import DOMAIN -from homeassistant.components.youtube.const import CONF_CHANNELS +from homeassistant.components.youtube.const import CONF_CHANNELS, DOMAIN from homeassistant.config_entries import ConfigEntryState from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr