diff --git a/homeassistant/components/lametric.py b/homeassistant/components/lametric.py index d7c56734e42..49b4f73ea17 100644 --- a/homeassistant/components/lametric.py +++ b/homeassistant/components/lametric.py @@ -51,13 +51,7 @@ def setup(hass, config): class HassLaMetricManager(): - """ - A class that encapsulated requests to the LaMetric manager. - - As the original class does not have a re-connect feature that is needed - for applications running for a long time as the OAuth tokens expire. This - class implements this reconnect() feature. - """ + """A class that encapsulated requests to the LaMetric manager.""" def __init__(self, client_id, client_secret): """Initialize HassLaMetricManager and connect to LaMetric.""" @@ -67,13 +61,3 @@ class HassLaMetricManager(): self.manager = LaMetricManager(client_id, client_secret) self._client_id = client_id self._client_secret = client_secret - - def reconnect(self): - """ - Reconnect to LaMetric. - - This is usually necessary when the OAuth token is expired. - """ - from lmnotify import LaMetricManager - _LOGGER.debug("Reconnecting to LaMetric") - self.manager = LaMetricManager(self._client_id, self._client_secret) diff --git a/homeassistant/components/notify/lametric.py b/homeassistant/components/notify/lametric.py index 32935419ee5..56030afb30c 100644 --- a/homeassistant/components/notify/lametric.py +++ b/homeassistant/components/notify/lametric.py @@ -78,12 +78,7 @@ class LaMetricNotificationService(BaseNotificationService): frames = [text_frame] - if sound is not None: - frames.append(sound) - - _LOGGER.debug(frames) - - model = Model(frames=frames) + model = Model(frames=frames, sound=sound) lmn = self.hasslametricmanager.manager try: devices = lmn.get_devices()