1
mirror of https://github.com/home-assistant/core synced 2024-10-04 07:58:43 +02:00

Prevent mpchc from spamming logs (#39663)

This commit is contained in:
Chris Talkington 2020-09-04 14:22:50 -05:00 committed by GitHub
parent ad6e8b2d62
commit 1fb70625a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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