Add platinum quality scale to Pegel Online (#131382)

This commit is contained in:
Michael 2025-07-09 21:33:07 +02:00 committed by GitHub
parent e012196af8
commit 84959a0077
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 97 additions and 4 deletions

View File

@ -12,7 +12,7 @@ from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import CONF_STATION
from .const import CONF_STATION, DOMAIN
from .coordinator import PegelOnlineConfigEntry, PegelOnlineDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
@ -30,7 +30,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: PegelOnlineConfigEntry)
try:
station = await api.async_get_station_details(station_uuid)
except CONNECT_ERRORS as err:
raise ConfigEntryNotReady("Failed to connect") from err
raise ConfigEntryNotReady(
translation_domain=DOMAIN,
translation_key="communication_error",
translation_placeholders={"error": str(err)},
) from err
coordinator = PegelOnlineDataUpdateCoordinator(hass, entry, api, station)

View File

@ -7,5 +7,6 @@
"integration_type": "service",
"iot_class": "cloud_polling",
"loggers": ["aiopegelonline"],
"quality_scale": "platinum",
"requirements": ["aiopegelonline==0.1.1"]
}

View File

@ -0,0 +1,87 @@
rules:
# Bronze
action-setup:
status: exempt
comment: no actions/services are implemented
appropriate-polling: done
brands: done
common-modules: done
config-flow-test-coverage: done
config-flow: done
dependency-transparency: done
docs-actions:
status: exempt
comment: no actions/services are implemented
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: exempt
comment: no actions/services are implemented
config-entry-unloading: done
docs-configuration-parameters:
status: exempt
comment: has no options flow
docs-installation-parameters: done
entity-unavailable: done
integration-owner: done
log-when-unavailable: done
parallel-updates: done
reauthentication-flow:
status: exempt
comment: no authentication necessary
test-coverage: done
# Gold
devices: done
diagnostics: done
discovery-update-info:
status: exempt
comment: pure webservice, no discovery
discovery:
status: exempt
comment: pure webservice, no discovery
docs-data-update: done
docs-examples: done
docs-known-limitations: done
docs-supported-devices: done
docs-supported-functions: done
docs-troubleshooting: done
docs-use-cases: done
dynamic-devices:
status: exempt
comment: not applicable - see stale-devices
entity-category: done
entity-device-class: done
entity-disabled-by-default: done
entity-translations: done
exception-translations: done
icon-translations: done
reconfiguration-flow:
status: exempt
comment: |
each config entry represents only one named measurement station,
so when the user wants to add another one, they can just add another config entry
repair-issues:
status: exempt
comment: no known use cases for repair issues or flows, yet
stale-devices:
status: exempt
comment: |
does not apply, since only one measurement station per config-entry
if a measurement station is removed from the data provider,
the user can just remove the related config entry
# Platinum
async-dependency: done
inject-websession: done
strict-typing: done

View File

@ -20,6 +20,9 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import PegelOnlineConfigEntry, PegelOnlineDataUpdateCoordinator
from .entity import PegelOnlineEntity
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class PegelOnlineSensorEntityDescription(SensorEntityDescription):

View File

@ -763,7 +763,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [
"pandora",
"panel_iframe",
"peco",
"pegel_online",
"pencom",
"permobil",
"persistent_notification",
@ -1818,7 +1817,6 @@ INTEGRATIONS_WITHOUT_SCALE = [
"palazzetti",
"panel_iframe",
"peco",
"pegel_online",
"pencom",
"permobil",
"persistent_notification",