Skip to content

Commit

Permalink
fix: return None for _sensor_type
Browse files Browse the repository at this point in the history
This is needed to fix a change in HA where device_class will overwrite
ICON settings if it exists
  • Loading branch information
alandtse committed Aug 8, 2020
1 parent 1942205 commit d5901c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions teslajsonpy/homeassistant/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, data: Dict, controller):

self.type = "binary sensor"
self.hass_type = "binary_sensor"
self._sensor_type = "connectivity"
self._sensor_type = None
self.name = self._name()
self.uniq_name = self._uniq_name()

Expand Down Expand Up @@ -87,7 +87,7 @@ def __init__(self, data: Dict, controller):
self.__state = None
self.type = "parking brake sensor"
self.hass_type = "binary_sensor"
self._sensor_type = "power"
self._sensor_type = None
self.name = self._name()
self.uniq_name = self._uniq_name()

Expand Down Expand Up @@ -143,7 +143,7 @@ def __init__(self, data, controller):
self.__state = None
self.type = "charger sensor"
self.hass_type = "binary_sensor"
self._sensor_type = "connectivity"
self._sensor_type = None
self.name = self._name()
self.uniq_name = self._uniq_name()

Expand Down

0 comments on commit d5901c7

Please sign in to comment.