From 9f30cd7826f91978e1ee50ecaf14183f22e2839b Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Thu, 28 Oct 2021 21:33:06 +0200 Subject: [PATCH] Add configuration_url to devolo Home Control (#58594) --- homeassistant/components/devolo_home_control/devolo_device.py | 2 ++ tests/components/devolo_home_control/mocks.py | 1 + 2 files changed, 3 insertions(+) diff --git a/homeassistant/components/devolo_home_control/devolo_device.py b/homeassistant/components/devolo_home_control/devolo_device.py index 7fdd53d0d87..f4f2432aa6e 100644 --- a/homeassistant/components/devolo_home_control/devolo_device.py +++ b/homeassistant/components/devolo_home_control/devolo_device.py @@ -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, diff --git a/tests/components/devolo_home_control/mocks.py b/tests/components/devolo_home_control/mocks.py index 7700d30b1dd..6651215251a 100644 --- a/tests/components/devolo_home_control/mocks.py +++ b/tests/components/devolo_home_control/mocks.py @@ -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):