Add extra state attributes to goalzero (#52932)

* Add extra state attributes to goalzero

* tweak
This commit is contained in:
Robert Hillis 2021-07-20 16:26:52 -04:00 committed by GitHub
parent 059a9bc8ed
commit a9b9c4f13c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 3 deletions

View file

@ -56,4 +56,4 @@ class YetiSensor(YetiEntity):
def state(self):
"""Return the state."""
if self.api.data:
return self.api.data[self._condition]
return self.api.data.get(self._condition)