mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Fix AttributeError traceback with darksky (#22101)
* Update darksky.py * fixes
This commit is contained in:
parent
1aab551eed
commit
9b1491a98d
@ -232,4 +232,6 @@ class DarkSkyData:
|
|||||||
@property
|
@property
|
||||||
def units(self):
|
def units(self):
|
||||||
"""Get the unit system of returned data."""
|
"""Get the unit system of returned data."""
|
||||||
|
if self.data is None:
|
||||||
|
return None
|
||||||
return self.data.json.get('flags').get('units')
|
return self.data.json.get('flags').get('units')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user