mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Netatmo, handle offline device (#23907)
* Netatmo, handle offline device * style
This commit is contained in:
parent
c2fc8a0d61
commit
7716e8fb68
@ -523,9 +523,9 @@ class NetatmoData:
|
|||||||
_LOGGER.debug("%s detected!", str(self.data_class.__name__))
|
_LOGGER.debug("%s detected!", str(self.data_class.__name__))
|
||||||
return station_data
|
return station_data
|
||||||
except NoDevice:
|
except NoDevice:
|
||||||
_LOGGER.error("No Weather or HomeCoach devices found for %s", str(
|
_LOGGER.warning("No Weather or HomeCoach devices found for %s",
|
||||||
self.station
|
str(self.station)
|
||||||
))
|
)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
@ -547,10 +547,14 @@ class NetatmoData:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if self.station is not None:
|
if self.station is not None:
|
||||||
self.data = self.station_data.lastData(
|
data = self.station_data.lastData(
|
||||||
station=self.station, exclude=3600)
|
station=self.station, exclude=3600)
|
||||||
else:
|
else:
|
||||||
self.data = self.station_data.lastData(exclude=3600)
|
data = self.station_data.lastData(exclude=3600)
|
||||||
|
if not data:
|
||||||
|
self._next_update = time() + NETATMO_UPDATE_INTERVAL
|
||||||
|
return
|
||||||
|
self.data = data
|
||||||
|
|
||||||
newinterval = 0
|
newinterval = 0
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user