From 997692c35aecce1b1b3d07d2ea0242b88138ec27 Mon Sep 17 00:00:00 2001 From: "Michael K. Avanessian" Date: Thu, 7 Mar 2024 00:47:40 -0800 Subject: [PATCH] Added https support for deep_links --- custom_components/sonarr_upcoming_media/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/sonarr_upcoming_media/sensor.py b/custom_components/sonarr_upcoming_media/sensor.py index 063e026..cc12abb 100644 --- a/custom_components/sonarr_upcoming_media/sensor.py +++ b/custom_components/sonarr_upcoming_media/sensor.py @@ -133,7 +133,8 @@ def extra_state_attributes(self): pass series_title = show['series']['title'] series_slug = series_title.lower().replace(' ', '-') - card_item['deep_link'] = f'http://{self.host}:{self.port}/series/{series_slug}' + protocol = 'https' if self.ssl else 'http' + card_item['deep_link'] = f'{protocol}://{self.host}:{self.port}/series/{series_slug}' card_json.append(card_item) attributes['data'] = card_json return attributes