Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions homeassistant/components/sensor/linky.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['pylinky==0.1.6']
REQUIREMENTS = ['pylinky==0.1.8']
_LOGGER = logging.getLogger(__name__)

SCAN_INTERVAL = timedelta(minutes=10)
Expand All @@ -37,11 +37,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):

from pylinky.client import LinkyClient, PyLinkyError
client = LinkyClient(username, password, None, timeout)

try:
client.fetch_data()
except PyLinkyError as exp:
_LOGGER.error(exp)
client.close_session()
return

devices = [LinkySensor('Linky', client)]
Expand Down Expand Up @@ -80,6 +80,7 @@ def update(self):
self._client.fetch_data()
except PyLinkyError as exp:
_LOGGER.error(exp)
self._client.close_session()
return

_LOGGER.debug(json.dumps(self._client.get_data(), indent=2))
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ pylgnetcast-homeassistant==0.2.0.dev0
pylgtv==0.1.9

# homeassistant.components.sensor.linky
pylinky==0.1.6
pylinky==0.1.8

# homeassistant.components.litejet
pylitejet==0.1
Expand Down