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