Add configuration_url
to Airly integration (#58911)
This commit is contained in:
parent
8dcaae69e1
commit
c14dcdb077
2 changed files with 5 additions and 0 deletions
|
@ -32,3 +32,4 @@ MANUFACTURER: Final = "Airly sp. z o.o."
|
||||||
MAX_UPDATE_INTERVAL: Final = 90
|
MAX_UPDATE_INTERVAL: Final = 90
|
||||||
MIN_UPDATE_INTERVAL: Final = 5
|
MIN_UPDATE_INTERVAL: Final = 5
|
||||||
NO_AIRLY_SENSORS: Final = "There are no Airly sensors in this area yet."
|
NO_AIRLY_SENSORS: Final = "There are no Airly sensors in this area yet."
|
||||||
|
URL = "https://airly.org/map/#{latitude},{longitude}"
|
||||||
|
|
|
@ -55,6 +55,7 @@ from .const import (
|
||||||
MANUFACTURER,
|
MANUFACTURER,
|
||||||
SUFFIX_LIMIT,
|
SUFFIX_LIMIT,
|
||||||
SUFFIX_PERCENT,
|
SUFFIX_PERCENT,
|
||||||
|
URL,
|
||||||
)
|
)
|
||||||
|
|
||||||
PARALLEL_UPDATES = 1
|
PARALLEL_UPDATES = 1
|
||||||
|
@ -157,6 +158,9 @@ class AirlySensor(CoordinatorEntity, SensorEntity):
|
||||||
identifiers={(DOMAIN, f"{coordinator.latitude}-{coordinator.longitude}")},
|
identifiers={(DOMAIN, f"{coordinator.latitude}-{coordinator.longitude}")},
|
||||||
manufacturer=MANUFACTURER,
|
manufacturer=MANUFACTURER,
|
||||||
name=DEFAULT_NAME,
|
name=DEFAULT_NAME,
|
||||||
|
configuration_url=URL.format(
|
||||||
|
latitude=coordinator.latitude, longitude=coordinator.longitude
|
||||||
|
),
|
||||||
)
|
)
|
||||||
self._attr_name = f"{name} {description.name}"
|
self._attr_name = f"{name} {description.name}"
|
||||||
self._attr_unique_id = (
|
self._attr_unique_id = (
|
||||||
|
|
Loading…
Add table
Reference in a new issue