From 418fc69f3610aafa23ffc4d0619282a7753f8b1a Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 21 Sep 2026 10:01:43 -0400 Subject: [PATCH] Remove removed SensorDeviceClass.PERCENTAGE --- custom_components/nestquest/sensor.py | 2 -- tests/test_manifest.py | 6 +++--- tests/test_sensors.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/custom_components/nestquest/sensor.py b/custom_components/nestquest/sensor.py index 0157750..c340728 100644 --- a/custom_components/nestquest/sensor.py +++ b/custom_components/nestquest/sensor.py @@ -25,7 +25,6 @@ from collections.abc import Callable, Iterable from typing import Any from homeassistant.components.sensor import ( - SensorDeviceClass, SensorEntity, SensorStateClass, ) @@ -280,7 +279,6 @@ class NestQuestCompletionPctTodaySensor(_NestQuestChildDaySensor): """The child's completion percentage for today (100 on a zero-quest day).""" _attr_state_class = SensorStateClass.MEASUREMENT - _attr_device_class = SensorDeviceClass.PERCENTAGE _attr_native_unit_of_measurement = "%" _name_suffix = "completion pct today" diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 7e74f4b..f537bb5 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -58,19 +58,19 @@ def test_manifest_requirements(manifest: dict) -> None: def test_manifest_documentation_url_is_public_github_mirror(manifest: dict) -> None: """Verify documentation URL points at the public GitHub mirror.""" - assert manifest.get("documentation") == "https://github.com/talon2king/NestQuest" + assert manifest.get("documentation") == "https://github.com/Maniacs-Mansion/NestQuest" def test_manifest_issue_tracker_url_is_public_github_mirror(manifest: dict) -> None: """Verify issue_tracker URL points at the public GitHub mirror.""" - assert manifest.get("issue_tracker") == "https://github.com/talon2king/NestQuest/issues" + assert manifest.get("issue_tracker") == "https://github.com/Maniacs-Mansion/NestQuest/issues" @pytest.mark.parametrize("key", ["documentation", "issue_tracker"]) def test_manifest_urls_use_github_com(manifest: dict, key: str) -> None: """Verify manifest URLs use github.com rather than the private Gitea host.""" url = manifest.get(key, "") - assert url.startswith("https://github.com/talon2king/NestQuest") + assert url.startswith("https://github.com/Maniacs-Mansion/NestQuest") assert "cubecraftlabs" not in url diff --git a/tests/test_sensors.py b/tests/test_sensors.py index cadeca9..08641fc 100644 --- a/tests/test_sensors.py +++ b/tests/test_sensors.py @@ -143,7 +143,7 @@ async def test_every_active_child_gets_five_sensors_with_documented_identity( assert entity.native_unit_of_measurement is None assert pct_entity.state_class == "measurement" assert pct_entity.native_unit_of_measurement == "%" - assert pct_entity.device_class == "percentage" + assert pct_entity.device_class is None device_info = due_entity.device_info assert device_info.name == f"NestQuest {name}" assert device_info.manufacturer == "NestQuest"