Skip to content

Commit

Permalink
Merge pull request #179 from fondberg/NativeValues
Browse files Browse the repository at this point in the history
Change to native_value for sensors
  • Loading branch information
astrandb authored Apr 6, 2022
2 parents adf8ae4 + 53d7419 commit 5c4dc08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions custom_components/easee/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def device_info(self):
)

@property
def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
def native_unit_of_measurement(self):
"""Return the native unit of measurement of this entity, if any."""
return self._units

@property
Expand Down
8 changes: 4 additions & 4 deletions custom_components/easee/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class ChargerSensor(ChargerEntity, SensorEntity):
"""Implementation of Easee charger sensor."""

@property
def state(self):
"""Return status."""
def native_value(self):
"""Return native value of sensor."""
return self._state


class EqualizerSensor(ChargerEntity, SensorEntity):
"""Implementation of Easee equalizer sensor."""

@property
def state(self):
"""Return status."""
def native_value(self):
"""Return native value of sensor."""
return self._state

@property
Expand Down

0 comments on commit 5c4dc08

Please sign in to comment.