Add configuration_url to devolo Home Control (#58594)

pull/58635/head
Guido Schmitz 2021-10-28 21:33:06 +02:00 committed by GitHub
parent 808e067c22
commit 9f30cd7826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@
from __future__ import annotations
import logging
from urllib.parse import urlparse
from devolo_home_control_api.devices.zwave import Zwave
from devolo_home_control_api.homecontrol import HomeControl
@ -33,6 +34,7 @@ class DevoloDeviceEntity(Entity):
self._attr_should_poll = False
self._attr_unique_id = element_uid
self._attr_device_info = DeviceInfo(
configuration_url=f"https://{urlparse(device_instance.href).netloc}",
identifiers={(DOMAIN, self._device_instance.uid)},
manufacturer=device_instance.brand,
model=device_instance.name,

View File

@ -45,6 +45,7 @@ class DeviceMock(Zwave):
self.name = "Test Device"
self.uid = "Test"
self.settings_property = {"general_device_settings": SettingsMock()}
self.href = "https://www.mydevolo.com"
class BinarySensorMock(DeviceMock):