From 31ea00f5c7a9639a8946364242da57d59584b5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 1 Oct 2023 17:16:19 +0300 Subject: [PATCH] Treat strings starting with https but not htt as soundtouch media URLs (#101183) --- homeassistant/components/soundtouch/media_player.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/soundtouch/media_player.py b/homeassistant/components/soundtouch/media_player.py index fa5c0dd7095..831b64f7056 100644 --- a/homeassistant/components/soundtouch/media_player.py +++ b/homeassistant/components/soundtouch/media_player.py @@ -3,7 +3,6 @@ from __future__ import annotations from functools import partial import logging -import re from typing import Any from libsoundtouch.device import SoundTouchDevice @@ -250,7 +249,7 @@ class SoundTouchMediaPlayer(MediaPlayerEntity): ) -> None: """Play a piece of media.""" _LOGGER.debug("Starting media with media_id: %s", media_id) - if re.match(r"http?://", str(media_id)): + if str(media_id).lower().startswith("http://"): # no https support # URL _LOGGER.debug("Playing URL %s", str(media_id)) self._device.play_url(str(media_id))