mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Handle timeouts gracefully (#24752)
This commit is contained in:
parent
236820d093
commit
da57f92796
@ -2,6 +2,7 @@
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@ -371,6 +372,9 @@ class ThermostatData:
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user