From 35e9cf68a2f9ba69319e9db1cee86d2271e0bcd3 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 21 Oct 2021 07:25:29 +1300 Subject: [PATCH] Add configuration url to Sonarr (#58085) --- homeassistant/components/sonarr/entity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/sonarr/entity.py b/homeassistant/components/sonarr/entity.py index d3f1b089d14..4d6eae8a669 100644 --- a/homeassistant/components/sonarr/entity.py +++ b/homeassistant/components/sonarr/entity.py @@ -35,10 +35,15 @@ class SonarrEntity(Entity): if self._device_id is None: return None + configuration_url = "https://" if self.sonarr.tls else "http://" + configuration_url += f"{self.sonarr.host}:{self.sonarr.port}" + configuration_url += self.sonarr.base_path.replace("/api", "") + return { ATTR_IDENTIFIERS: {(DOMAIN, self._device_id)}, ATTR_NAME: "Activity Sensor", ATTR_MANUFACTURER: "Sonarr", ATTR_SW_VERSION: self.sonarr.app.info.version, "entry_type": "service", + "configuration_url": configuration_url, }