Skip to content

Commit

Permalink
refactor: add attributes to charger connection
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Jan 31, 2020
1 parent 9739117 commit e0631e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions teslajsonpy/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ async def async_update(self):
data = self._controller.get_charging_params(self._id)
if data:
self.attrs["charging_state"] = data["charging_state"]
self.attrs["conn_charge_cable"] = data["conn_charge_cable"]
self.attrs["fast_charger_present"] = data["fast_charger_present"]
self.attrs["fast_charger_brand"] = data["fast_charger_brand"]
self.attrs["fast_charger_type"] = data["fast_charger_type"]
if data["charging_state"] in ["Disconnected"]:
self.__state = False
else:
Expand Down

0 comments on commit e0631e1

Please sign in to comment.