Handle connection issue for netatmo (#21346)
* Handle connection issue for netatmo * reduce logging
This commit is contained in:
parent
6743ef10ab
commit
b588c1fe1c
1 changed files with 7 additions and 0 deletions
|
@ -189,6 +189,13 @@ class NetAtmoSensor(Entity):
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data from NetAtmo API and updates the states."""
|
"""Get the latest data from NetAtmo API and updates the states."""
|
||||||
self.netatmo_data.update()
|
self.netatmo_data.update()
|
||||||
|
if self.netatmo_data.data is None:
|
||||||
|
if self._state is None:
|
||||||
|
return
|
||||||
|
_LOGGER.warning("No data found for %s", self.module_name)
|
||||||
|
self._state = None
|
||||||
|
return
|
||||||
|
|
||||||
data = self.netatmo_data.data.get(self.module_name)
|
data = self.netatmo_data.data.get(self.module_name)
|
||||||
|
|
||||||
if data is None:
|
if data is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue