From 8b3bad1f54a966cbd80dbdde1961ea279087a5d4 Mon Sep 17 00:00:00 2001 From: Manu <4445816+tr4nt0r@users.noreply.github.com> Date: Thu, 22 May 2025 07:22:50 +0200 Subject: [PATCH] Bump habiticalib to v.0.4.0 (#145414) Bump habiticalib to v0.4.0 --- .../components/habitica/manifest.json | 2 +- pyproject.toml | 2 -- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- script/hassfest/requirements.py | 1 - tests/components/habitica/conftest.py | 12 --------- .../components/habitica/fixtures/content.json | 25 +++++++++++++++++++ .../habitica/snapshots/test_diagnostics.ambr | 2 ++ 8 files changed, 30 insertions(+), 18 deletions(-) diff --git a/homeassistant/components/habitica/manifest.json b/homeassistant/components/habitica/manifest.json index 48b6997239e..8b03e5efe01 100644 --- a/homeassistant/components/habitica/manifest.json +++ b/homeassistant/components/habitica/manifest.json @@ -7,5 +7,5 @@ "iot_class": "cloud_polling", "loggers": ["habiticalib"], "quality_scale": "platinum", - "requirements": ["habiticalib==0.3.7"] + "requirements": ["habiticalib==0.4.0"] } diff --git a/pyproject.toml b/pyproject.toml index 30ca8efa7c6..955b2a707a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -604,8 +604,6 @@ filterwarnings = [ # - pkg_resources # https://pypi.org/project/aiomusiccast/ - v0.14.8 - 2023-03-20 "ignore:pkg_resources is deprecated as an API:DeprecationWarning:aiomusiccast", - # https://pypi.org/project/habitipy/ - v0.3.3 - 2024-10-28 - "ignore:pkg_resources is deprecated as an API:DeprecationWarning:habitipy.api", # https://github.com/eavanvalkenburg/pysiaalarm/blob/v3.1.1/src/pysiaalarm/data/data.py#L7 - v3.1.1 - 2023-04-17 "ignore:pkg_resources is deprecated as an API:DeprecationWarning:pysiaalarm.data.data", # https://pypi.org/project/pybotvac/ - v0.0.26 - 2025-02-26 diff --git a/requirements_all.txt b/requirements_all.txt index 49abbd90ef0..7777385f872 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1115,7 +1115,7 @@ ha-philipsjs==3.2.2 ha-silabs-firmware-client==0.2.0 # homeassistant.components.habitica -habiticalib==0.3.7 +habiticalib==0.4.0 # homeassistant.components.bluetooth habluetooth==3.48.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 5053d09f75e..5a8922a1c17 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -957,7 +957,7 @@ ha-philipsjs==3.2.2 ha-silabs-firmware-client==0.2.0 # homeassistant.components.habitica -habiticalib==0.3.7 +habiticalib==0.4.0 # homeassistant.components.bluetooth habluetooth==3.48.2 diff --git a/script/hassfest/requirements.py b/script/hassfest/requirements.py index dd5374461c3..464e94d918c 100644 --- a/script/hassfest/requirements.py +++ b/script/hassfest/requirements.py @@ -32,7 +32,6 @@ FORBIDDEN_PACKAGES = {"setuptools", "wheel"} FORBIDDEN_PACKAGE_EXCEPTIONS = { # Direct dependencies "fitbit", # setuptools (fitbit) - "habitipy", # setuptools (habitica) "influxdb-client", # setuptools (influxdb) "microbeespy", # setuptools (microbees) "pyefergy", # types-pytz (efergy) diff --git a/tests/components/habitica/conftest.py b/tests/components/habitica/conftest.py index 4ef14699e0b..fa2b65af6c3 100644 --- a/tests/components/habitica/conftest.py +++ b/tests/components/habitica/conftest.py @@ -155,18 +155,6 @@ async def mock_habiticalib() -> Generator[AsyncMock]: client.create_task.return_value = HabiticaTaskResponse.from_json( load_fixture("task.json", DOMAIN) ) - client.habitipy.return_value = { - "tasks": { - "user": { - "post": AsyncMock( - return_value={ - "text": "Use API from Home Assistant", - "type": "todo", - } - ) - } - } - } yield client diff --git a/tests/components/habitica/fixtures/content.json b/tests/components/habitica/fixtures/content.json index e26dbeb17cc..e66186860c7 100644 --- a/tests/components/habitica/fixtures/content.json +++ b/tests/components/habitica/fixtures/content.json @@ -657,6 +657,31 @@ "canDrop": false, "key": "Saddle" } + }, + "loginIncentives": { + "0": { + "nextRewardAt": 1 + }, + "1": { + "rewardKey": ["armor_special_bardRobes"], + "reward": [ + { + "text": "Bardic Robes", + "notes": "These colorful robes may be conspicuous, but you can sing your way out of any situation. Increases Perception by 3.", + "per": 3, + "value": 0, + "type": "armor", + "key": "armor_special_bardRobes", + "set": "special-bardRobes", + "klass": "special", + "index": "bardRobes", + "str": 0, + "int": 0, + "con": 0 + } + ], + "nextRewardAt": 2 + } } }, "appVersion": "5.29.2" diff --git a/tests/components/habitica/snapshots/test_diagnostics.ambr b/tests/components/habitica/snapshots/test_diagnostics.ambr index 718aea99ebc..e04edea3d94 100644 --- a/tests/components/habitica/snapshots/test_diagnostics.ambr +++ b/tests/components/habitica/snapshots/test_diagnostics.ambr @@ -541,6 +541,8 @@ 'quest': dict({ 'RSVPNeeded': True, 'key': 'dustbunnies', + 'members': dict({ + }), 'progress': dict({ 'collect': dict({ }),