Add configuration URL for Ambient PWS (#59616)
parent
cce441332f
commit
303b6bc4f1
|
@ -5,6 +5,7 @@ from typing import Any
|
||||||
|
|
||||||
from aioambient import Websocket
|
from aioambient import Websocket
|
||||||
from aioambient.errors import WebsocketError
|
from aioambient.errors import WebsocketError
|
||||||
|
from aioambient.util import get_public_device_id
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
@ -220,11 +221,15 @@ class AmbientWeatherEntity(Entity):
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the entity."""
|
"""Initialize the entity."""
|
||||||
self._ambient = ambient
|
self._ambient = ambient
|
||||||
|
|
||||||
|
public_device_id = get_public_device_id(mac_address)
|
||||||
self._attr_device_info = DeviceInfo(
|
self._attr_device_info = DeviceInfo(
|
||||||
|
configuration_url=f"https://ambientweather.net/dashboard/{public_device_id}",
|
||||||
identifiers={(DOMAIN, mac_address)},
|
identifiers={(DOMAIN, mac_address)},
|
||||||
manufacturer="Ambient Weather",
|
manufacturer="Ambient Weather",
|
||||||
name=station_name,
|
name=station_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._attr_name = f"{station_name}_{description.name}"
|
self._attr_name = f"{station_name}_{description.name}"
|
||||||
self._attr_unique_id = f"{mac_address}_{description.key}"
|
self._attr_unique_id = f"{mac_address}_{description.key}"
|
||||||
self._mac_address = mac_address
|
self._mac_address = mac_address
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Ambient Weather Station",
|
"name": "Ambient Weather Station",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/ambient_station",
|
"documentation": "https://www.home-assistant.io/integrations/ambient_station",
|
||||||
"requirements": ["aioambient==2021.10.1"],
|
"requirements": ["aioambient==2021.11.0"],
|
||||||
"codeowners": ["@bachya"],
|
"codeowners": ["@bachya"],
|
||||||
"iot_class": "cloud_push"
|
"iot_class": "cloud_push"
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ aio_geojson_nsw_rfs_incidents==0.4
|
||||||
aio_georss_gdacs==0.5
|
aio_georss_gdacs==0.5
|
||||||
|
|
||||||
# homeassistant.components.ambient_station
|
# homeassistant.components.ambient_station
|
||||||
aioambient==2021.10.1
|
aioambient==2021.11.0
|
||||||
|
|
||||||
# homeassistant.components.asuswrt
|
# homeassistant.components.asuswrt
|
||||||
aioasuswrt==1.4.0
|
aioasuswrt==1.4.0
|
||||||
|
|
|
@ -81,7 +81,7 @@ aio_geojson_nsw_rfs_incidents==0.4
|
||||||
aio_georss_gdacs==0.5
|
aio_georss_gdacs==0.5
|
||||||
|
|
||||||
# homeassistant.components.ambient_station
|
# homeassistant.components.ambient_station
|
||||||
aioambient==2021.10.1
|
aioambient==2021.11.0
|
||||||
|
|
||||||
# homeassistant.components.asuswrt
|
# homeassistant.components.asuswrt
|
||||||
aioasuswrt==1.4.0
|
aioasuswrt==1.4.0
|
||||||
|
|
Loading…
Reference in New Issue