Fix reporting of battery sensor for Tesla (#31232)

* Fix reporting of battery sensor for Tesla

* Remove try
This commit is contained in:
Alan Tse 2020-01-28 23:58:43 -08:00 committed by GitHub
parent 61a8618010
commit bcdef4e500
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -55,3 +55,4 @@ class TeslaBinarySensor(TeslaDevice, BinarySensorDevice):
_LOGGER.debug("Updating sensor: %s", self._name)
await super().async_update()
self._state = self.tesla_device.get_value()
self._attributes = self.tesla_device.attrs