From 2b3f5319d6fe044df93867671a24bc8a1ab330c7 Mon Sep 17 00:00:00 2001 From: "Mr. Bubbles" Date: Tue, 20 Feb 2024 08:46:02 +0100 Subject: [PATCH] Bump bring-api to 0.3.1 (#110769) * bump bring-api * unpinned dependencies --- homeassistant/components/bring/__init__.py | 2 +- homeassistant/components/bring/config_flow.py | 2 +- homeassistant/components/bring/coordinator.py | 4 ++-- homeassistant/components/bring/manifest.json | 2 +- homeassistant/components/bring/todo.py | 12 ++++++------ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/bring/conftest.py | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/bring/__init__.py b/homeassistant/components/bring/__init__.py index dc9f053876e..aaf11130b8d 100644 --- a/homeassistant/components/bring/__init__.py +++ b/homeassistant/components/bring/__init__.py @@ -35,7 +35,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: try: await bring.login() - await bring.loadLists() + await bring.load_lists() except BringRequestException as e: raise ConfigEntryNotReady( f"Timeout while connecting for email '{email}'" diff --git a/homeassistant/components/bring/config_flow.py b/homeassistant/components/bring/config_flow.py index 0a2198712c9..efd99fd938a 100644 --- a/homeassistant/components/bring/config_flow.py +++ b/homeassistant/components/bring/config_flow.py @@ -54,7 +54,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): try: await bring.login() - await bring.loadLists() + await bring.load_lists() except BringRequestException: errors["base"] = "cannot_connect" except BringAuthException: diff --git a/homeassistant/components/bring/coordinator.py b/homeassistant/components/bring/coordinator.py index 57cc3d71085..9005f429823 100644 --- a/homeassistant/components/bring/coordinator.py +++ b/homeassistant/components/bring/coordinator.py @@ -40,7 +40,7 @@ class BringDataUpdateCoordinator(DataUpdateCoordinator[dict[str, BringData]]): async def _async_update_data(self) -> dict[str, BringData]: try: - lists_response = await self.bring.loadLists() + lists_response = await self.bring.load_lists() except BringRequestException as e: raise UpdateFailed("Unable to connect and retrieve data from bring") from e except BringParseException as e: @@ -49,7 +49,7 @@ class BringDataUpdateCoordinator(DataUpdateCoordinator[dict[str, BringData]]): list_dict = {} for lst in lists_response["lists"]: try: - items = await self.bring.getItems(lst["listUuid"]) + items = await self.bring.get_list(lst["listUuid"]) except BringRequestException as e: raise UpdateFailed( "Unable to connect and retrieve data from bring" diff --git a/homeassistant/components/bring/manifest.json b/homeassistant/components/bring/manifest.json index 195fbf05f1f..4a22cdd1e4a 100644 --- a/homeassistant/components/bring/manifest.json +++ b/homeassistant/components/bring/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/bring", "integration_type": "service", "iot_class": "cloud_polling", - "requirements": ["bring-api==0.1.1"] + "requirements": ["bring-api==0.3.1"] } diff --git a/homeassistant/components/bring/todo.py b/homeassistant/components/bring/todo.py index 608cc58bfba..8bdd0ebaf36 100644 --- a/homeassistant/components/bring/todo.py +++ b/homeassistant/components/bring/todo.py @@ -91,7 +91,7 @@ class BringTodoListEntity( async def async_create_todo_item(self, item: TodoItem) -> None: """Add an item to the To-do list.""" try: - await self.coordinator.bring.saveItem( + await self.coordinator.bring.save_item( self.bring_list["listUuid"], item.summary, item.description or "" ) except BringRequestException as e: @@ -123,14 +123,14 @@ class BringTodoListEntity( assert item.uid if item.status == TodoItemStatus.COMPLETED: - await self.coordinator.bring.removeItem( + await self.coordinator.bring.remove_item( bring_list["listUuid"], item.uid, ) elif item.summary == item.uid: try: - await self.coordinator.bring.updateItem( + await self.coordinator.bring.update_item( bring_list["listUuid"], item.uid, item.description or "", @@ -139,11 +139,11 @@ class BringTodoListEntity( raise HomeAssistantError("Unable to update todo item for bring") from e else: try: - await self.coordinator.bring.removeItem( + await self.coordinator.bring.remove_item( bring_list["listUuid"], item.uid, ) - await self.coordinator.bring.saveItem( + await self.coordinator.bring.save_tem( bring_list["listUuid"], item.summary, item.description or "", @@ -157,7 +157,7 @@ class BringTodoListEntity( """Delete an item from the To-do list.""" for uid in uids: try: - await self.coordinator.bring.removeItem( + await self.coordinator.bring.remove_item( self.bring_list["listUuid"], uid ) except BringRequestException as e: diff --git a/requirements_all.txt b/requirements_all.txt index ace441fb5c8..d51d4b2e3b7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -600,7 +600,7 @@ boschshcpy==0.2.75 boto3==1.33.13 # homeassistant.components.bring -bring-api==0.1.1 +bring-api==0.3.1 # homeassistant.components.broadlink broadlink==0.18.3 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 110d3094a0e..4f3b330ad18 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -508,7 +508,7 @@ bond-async==0.2.1 boschshcpy==0.2.75 # homeassistant.components.bring -bring-api==0.1.1 +bring-api==0.3.1 # homeassistant.components.broadlink broadlink==0.18.3 diff --git a/tests/components/bring/conftest.py b/tests/components/bring/conftest.py index b8504f38e7f..0b15d31eecb 100644 --- a/tests/components/bring/conftest.py +++ b/tests/components/bring/conftest.py @@ -37,7 +37,7 @@ def mock_bring_client() -> Generator[AsyncMock, None, None]: client = mock_client.return_value client.uuid = UUID client.login.return_value = True - client.loadLists.return_value = {"lists": []} + client.load_lists.return_value = {"lists": []} yield client