Bring nobo_hub to Bronze quality scale (#168638)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Øyvind Matheson Wergeland
2026-05-13 19:39:23 +02:00
committed by GitHub
co-authored by Claude Opus 4.7
parent f82bc56dfa
commit ff971ce20b
7 changed files with 109 additions and 9 deletions
+8 -3
View File
@@ -15,7 +15,12 @@ from homeassistant.components.climate import (
ClimateEntityFeature,
HVACMode,
)
from homeassistant.const import ATTR_NAME, PRECISION_TENTHS, UnitOfTemperature
from homeassistant.const import (
ATTR_NAME,
PRECISION_TENTHS,
PRECISION_WHOLE,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -80,7 +85,7 @@ class NoboZone(NoboBaseEntity, ClimateEntity):
_attr_preset_modes = PRESET_MODES
_attr_supported_features = SUPPORT_FLAGS
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_target_temperature_step = 1
_attr_target_temperature_step = PRECISION_WHOLE
# Need to poll to get preset change when in HVACMode.AUTO
_attr_should_poll = True
@@ -137,7 +142,7 @@ class NoboZone(NoboBaseEntity, ClimateEntity):
@callback
def _read_state(self) -> None:
"""Read the current state from the hub. These are only local calls."""
"""Copy the current hub state onto the entity attributes."""
if self._id not in self._nobo.zones:
# Zone removed via the Nobø app; mark unavailable.
self._attr_available = False
+6 -1
View File
@@ -34,5 +34,10 @@ class NoboBaseEntity(Entity):
@callback
def _read_state(self) -> None:
"""Read the current state from the hub. Must be overridden."""
"""Copy the current hub state from the pynobo client onto the entity attributes.
The pynobo client keeps its own in-memory state, updated via pushes
from the hub; subclasses override this to map the relevant values
onto their `_attr_*` fields. Must be overridden.
"""
raise NotImplementedError
@@ -12,5 +12,6 @@
"documentation": "https://www.home-assistant.io/integrations/nobo_hub",
"integration_type": "hub",
"iot_class": "local_push",
"quality_scale": "bronze",
"requirements": ["pynobo==1.8.1"]
}
@@ -0,0 +1,91 @@
rules:
# Bronze
action-setup:
status: exempt
comment: Integration does not register custom actions.
appropriate-polling: done
brands: done
common-modules: done
config-flow-test-coverage:
status: done
comment: >
Tests driven to terminal CREATE_ENTRY or ABORT in PR #170141.
config-flow: done
dependency-transparency: done
docs-actions:
status: exempt
comment: Integration does not register custom actions.
docs-high-level-description: done
docs-installation-instructions: done
docs-removal-instructions: done
entity-event-setup: done
entity-unique-id: done
has-entity-name: done
runtime-data: done
test-before-configure: done
test-before-setup: done
unique-config-entry: done
# Silver
action-exceptions:
status: todo
comment: >
Entity actions (climate set_hvac_mode/set_preset_mode/set_temperature,
select select_option) currently raise unwrapped exceptions; will wrap
in HomeAssistantError with translation keys.
config-entry-unloading: done
docs-configuration-parameters: done
docs-installation-parameters: done
entity-unavailable: todo
integration-owner: done
log-when-unavailable: todo
parallel-updates: done
reauthentication-flow:
status: exempt
comment: The hub does not require authentication.
test-coverage:
status: done
comment: >
Investigate whether the `_spec_hub` helper in `test_init.py` can be
replaced by the conftest base mock.
# Gold
devices:
status: done
comment: >
Model name "Nobø Ecohub" under review for rename to "Nobø Hub".
diagnostics: todo
discovery: done
discovery-update-info: todo
docs-data-update: todo
docs-examples: todo
docs-known-limitations: todo
docs-supported-devices: todo
docs-supported-functions: todo
docs-troubleshooting: todo
docs-use-cases: todo
dynamic-devices: todo
entity-category: todo
entity-device-class:
status: todo
comment: >
Custom device class on global override select being dropped in
PR #170135.
entity-disabled-by-default: todo
entity-translations: todo
exception-translations: todo
icon-translations: todo
reconfiguration-flow: todo
repair-issues:
status: exempt
comment: Integration has no repair scenarios.
stale-devices: todo
# Platinum
async-dependency: done
inject-websession:
status: exempt
comment: Integration uses a local TCP socket (via pynobo); no HTTP client is used.
strict-typing:
status: todo
comment: Requires release of pynobo 1.9.0
+2 -2
View File
@@ -92,7 +92,7 @@ class NoboGlobalSelector(NoboBaseEntity, SelectEntity):
@callback
def _read_state(self) -> None:
"""Read the current state from the hub. These are only local calls."""
"""Copy the current hub state onto the entity attributes."""
for override in self._nobo.overrides.values():
if override["target_type"] == nobo.API.OVERRIDE_TARGET_GLOBAL:
self._attr_current_option = self._modes[override["mode"]]
@@ -135,7 +135,7 @@ class NoboProfileSelector(NoboBaseEntity, SelectEntity):
@callback
def _read_state(self) -> None:
"""Read the current state from the hub. These are only local calls."""
"""Copy the current hub state onto the entity attributes."""
if self._id not in self._nobo.zones:
# Zone removed via the Nobø app; mark unavailable.
self._attr_available = False
+1 -1
View File
@@ -69,7 +69,7 @@ class NoboTemperatureSensor(NoboBaseEntity, SensorEntity):
@callback
def _read_state(self) -> None:
"""Read the current state from the hub. This is a local call."""
"""Copy the current hub state onto the entity attributes."""
if self._id not in self._nobo.components:
# Component removed via the Nobø app; mark unavailable.
self._attr_available = False
-2
View File
@@ -666,7 +666,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [
"nmbs",
"no_ip",
"noaa_tides",
"nobo_hub",
"norway_air",
"notify_events",
"notion",
@@ -1651,7 +1650,6 @@ INTEGRATIONS_WITHOUT_SCALE = [
"nmbs",
"no_ip",
"noaa_tides",
"nobo_hub",
"norway_air",
"notify_events",
"notion",