mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add configuration_url
to GIOS integration (#58840)
This commit is contained in:
parent
a122cbab61
commit
7126c9b0de
@ -27,6 +27,8 @@ SCAN_INTERVAL: Final = timedelta(minutes=30)
|
||||
DOMAIN: Final = "gios"
|
||||
MANUFACTURER: Final = "Główny Inspektorat Ochrony Środowiska"
|
||||
|
||||
URL = "http://powietrze.gios.gov.pl/pjp/current/station_details/info/{station_id}"
|
||||
|
||||
API_TIMEOUT: Final = 30
|
||||
|
||||
ATTR_INDEX: Final = "index"
|
||||
|
@ -25,6 +25,7 @@ from .const import (
|
||||
DOMAIN,
|
||||
MANUFACTURER,
|
||||
SENSOR_TYPES,
|
||||
URL,
|
||||
)
|
||||
from .model import GiosSensorEntityDescription
|
||||
|
||||
@ -86,6 +87,7 @@ class GiosSensor(CoordinatorEntity, SensorEntity):
|
||||
identifiers={(DOMAIN, str(coordinator.gios.station_id))},
|
||||
manufacturer=MANUFACTURER,
|
||||
name=DEFAULT_NAME,
|
||||
configuration_url=URL.format(station_id=coordinator.gios.station_id),
|
||||
)
|
||||
self._attr_name = f"{name} {description.name}"
|
||||
self._attr_unique_id = f"{coordinator.gios.station_id}-{description.key}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user