mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Add platinum quality scale to Pegel Online (#131382)
This commit is contained in:
parent
e012196af8
commit
84959a0077
@ -12,7 +12,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
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
|
from .coordinator import PegelOnlineConfigEntry, PegelOnlineDataUpdateCoordinator
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -30,7 +30,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: PegelOnlineConfigEntry)
|
|||||||
try:
|
try:
|
||||||
station = await api.async_get_station_details(station_uuid)
|
station = await api.async_get_station_details(station_uuid)
|
||||||
except CONNECT_ERRORS as err:
|
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)
|
coordinator = PegelOnlineDataUpdateCoordinator(hass, entry, api, station)
|
||||||
|
|
||||||
|
@ -7,5 +7,6 @@
|
|||||||
"integration_type": "service",
|
"integration_type": "service",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["aiopegelonline"],
|
"loggers": ["aiopegelonline"],
|
||||||
|
"quality_scale": "platinum",
|
||||||
"requirements": ["aiopegelonline==0.1.1"]
|
"requirements": ["aiopegelonline==0.1.1"]
|
||||||
}
|
}
|
||||||
|
87
homeassistant/components/pegel_online/quality_scale.yaml
Normal file
87
homeassistant/components/pegel_online/quality_scale.yaml
Normal 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
|
@ -20,6 +20,9 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
|||||||
from .coordinator import PegelOnlineConfigEntry, PegelOnlineDataUpdateCoordinator
|
from .coordinator import PegelOnlineConfigEntry, PegelOnlineDataUpdateCoordinator
|
||||||
from .entity import PegelOnlineEntity
|
from .entity import PegelOnlineEntity
|
||||||
|
|
||||||
|
# Coordinator is used to centralize the data updates
|
||||||
|
PARALLEL_UPDATES = 0
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True, kw_only=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class PegelOnlineSensorEntityDescription(SensorEntityDescription):
|
class PegelOnlineSensorEntityDescription(SensorEntityDescription):
|
||||||
|
@ -763,7 +763,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [
|
|||||||
"pandora",
|
"pandora",
|
||||||
"panel_iframe",
|
"panel_iframe",
|
||||||
"peco",
|
"peco",
|
||||||
"pegel_online",
|
|
||||||
"pencom",
|
"pencom",
|
||||||
"permobil",
|
"permobil",
|
||||||
"persistent_notification",
|
"persistent_notification",
|
||||||
@ -1818,7 +1817,6 @@ INTEGRATIONS_WITHOUT_SCALE = [
|
|||||||
"palazzetti",
|
"palazzetti",
|
||||||
"panel_iframe",
|
"panel_iframe",
|
||||||
"peco",
|
"peco",
|
||||||
"pegel_online",
|
|
||||||
"pencom",
|
"pencom",
|
||||||
"permobil",
|
"permobil",
|
||||||
"persistent_notification",
|
"persistent_notification",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user