Skip to content

Commit

Permalink
Handle timeouts gracefully (#24752)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgtobi authored and balloob committed Jun 25, 2019
1 parent 236820d commit da57f92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/netatmo/climate.py
Expand Up @@ -2,6 +2,7 @@
import logging
from datetime import timedelta

import requests
import voluptuous as vol

import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -371,6 +372,9 @@ def update(self):
except TypeError:
_LOGGER.error("Error when getting homestatus.")
return
except requests.exceptions.Timeout:
_LOGGER.warning("Timed out when connecting to Netatmo server.")
return
_LOGGER.debug("Following is the debugging output for homestatus:")
_LOGGER.debug(self.homestatus.rawData)
for room in self.homestatus.rooms:
Expand Down

0 comments on commit da57f92

Please sign in to comment.