Add configuration URL for Ambient PWS (#59616)

pull/59848/head
Aaron Bach 2021-11-13 06:19:04 -07:00 committed by GitHub
parent cce441332f
commit 303b6bc4f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,7 @@ from typing import Any
from aioambient import Websocket
from aioambient.errors import WebsocketError
from aioambient.util import get_public_device_id
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -220,11 +221,15 @@ class AmbientWeatherEntity(Entity):
) -> None:
"""Initialize the entity."""
self._ambient = ambient
public_device_id = get_public_device_id(mac_address)
self._attr_device_info = DeviceInfo(
configuration_url=f"https://ambientweather.net/dashboard/{public_device_id}",
identifiers={(DOMAIN, mac_address)},
manufacturer="Ambient Weather",
name=station_name,
)
self._attr_name = f"{station_name}_{description.name}"
self._attr_unique_id = f"{mac_address}_{description.key}"
self._mac_address = mac_address

View File

@ -3,7 +3,7 @@
"name": "Ambient Weather Station",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/ambient_station",
"requirements": ["aioambient==2021.10.1"],
"requirements": ["aioambient==2021.11.0"],
"codeowners": ["@bachya"],
"iot_class": "cloud_push"
}

View File

@ -133,7 +133,7 @@ aio_geojson_nsw_rfs_incidents==0.4
aio_georss_gdacs==0.5
# homeassistant.components.ambient_station
aioambient==2021.10.1
aioambient==2021.11.0
# homeassistant.components.asuswrt
aioasuswrt==1.4.0

View File

@ -81,7 +81,7 @@ aio_geojson_nsw_rfs_incidents==0.4
aio_georss_gdacs==0.5
# homeassistant.components.ambient_station
aioambient==2021.10.1
aioambient==2021.11.0
# homeassistant.components.asuswrt
aioasuswrt==1.4.0