From 410f19c77718f1d6c5a1c968c1197421436b6994 Mon Sep 17 00:00:00 2001 From: Rene Nulsch <33263735+ReneNulschDE@users.noreply.github.com> Date: Tue, 8 Jan 2019 14:06:08 +0100 Subject: [PATCH] Replace MyChevy persistant_notification with error log entry (#19804) The mychevy service is notoriously unreliable, often only having 50% uptime. Previously a persistent notification was emitted when the platform errored out. Users have found that is happening too often, so instead log an error when this happens instead. --- homeassistant/components/sensor/mychevy.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/sensor/mychevy.py b/homeassistant/components/sensor/mychevy.py index 989126acc20..a835321991d 100644 --- a/homeassistant/components/sensor/mychevy.py +++ b/homeassistant/components/sensor/mychevy.py @@ -8,7 +8,7 @@ import logging from homeassistant.components.mychevy import ( EVSensorConfig, DOMAIN as MYCHEVY_DOMAIN, MYCHEVY_ERROR, MYCHEVY_SUCCESS, - NOTIFICATION_ID, NOTIFICATION_TITLE, UPDATE_TOPIC, ERROR_TOPIC + UPDATE_TOPIC, ERROR_TOPIC ) from homeassistant.components.sensor import ENTITY_ID_FORMAT from homeassistant.core import callback @@ -74,13 +74,10 @@ class MyChevyStatus(Entity): @callback def error(self): """Update state, trigger updates.""" - if self._state != MYCHEVY_ERROR: - self.hass.components.persistent_notification.create( - "Error:
Connection to mychevy website failed. " - "This probably means the mychevy to OnStar link is down.", - title=NOTIFICATION_TITLE, - notification_id=NOTIFICATION_ID) - self._state = MYCHEVY_ERROR + _LOGGER.error( + "Connection to mychevy website failed. " + "This probably means the mychevy to OnStar link is down") + self._state = MYCHEVY_ERROR self.async_schedule_update_ha_state() @property