Add missing Netatmo config url for public weather (#81220)

Add missing config url for public weather
This commit is contained in:
Tobias Sauerwein 2022-10-29 23:50:34 +02:00 committed by GitHub
parent 82f03f6089
commit 833d271eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ CONF_URL_SECURITY = "https://home.netatmo.com/security"
CONF_URL_ENERGY = "https://my.netatmo.com/app/energy"
CONF_URL_WEATHER = "https://my.netatmo.com/app/weather"
CONF_URL_CONTROL = "https://home.netatmo.com/control"
CONF_URL_PUBLIC_WEATHER = "https://weathermap.netatmo.com/"
AUTH = "netatmo_auth"
CONF_PUBLIC = "public_sensor_config"

View File

@ -39,6 +39,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import (
CONF_URL_ENERGY,
CONF_URL_PUBLIC_WEATHER,
CONF_URL_WEATHER,
CONF_WEATHER_AREAS,
DATA_HANDLER,
@ -702,6 +703,7 @@ class NetatmoPublicSensor(NetatmoBase, SensorEntity):
self._device_name = f"{self._area_name}"
self._attr_name = f"{description.name}"
self._show_on_map = area.show_on_map
self._config_url = CONF_URL_PUBLIC_WEATHER
self._attr_unique_id = (
f"{self._device_name.replace(' ', '-')}-{description.key}"
)