From 1fb70625a38131faade95d16d7cc264945d47bfa Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Fri, 4 Sep 2020 14:22:50 -0500 Subject: [PATCH] Prevent mpchc from spamming logs (#39663) --- homeassistant/components/mpchc/media_player.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/mpchc/media_player.py b/homeassistant/components/mpchc/media_player.py index c09ab685597..8964ea7ed6f 100644 --- a/homeassistant/components/mpchc/media_player.py +++ b/homeassistant/components/mpchc/media_player.py @@ -82,7 +82,9 @@ class MpcHcDevice(MediaPlayerEntity): self._player_variables[var[0]] = var[1].lower() self._available = True except requests.exceptions.RequestException: - _LOGGER.error("Could not connect to MPC-HC at: %s", self._url) + if self.available: + _LOGGER.error("Could not connect to MPC-HC at: %s", self._url) + self._player_variables = {} self._available = False