Skip to content

Commit

Permalink
Merge pull request #475 from stickpin/patch-1
Browse files Browse the repository at this point in the history
Fix  Home Assistant 2023.5.x error
  • Loading branch information
robinostlund authored May 8, 2023
2 parents edab19e + 4e7aefa commit 03de13a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/volkswagencarnet/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def _attr_native_value(self):
@property
def _attr_native_unit_of_measurement(self):
"""Return the unit of measurement."""
return self.instrument.unit
if self.instrument.unit:
return self.instrument.unit

@property
def device_class(self) -> Union[SensorDeviceClass, None]:
Expand Down

0 comments on commit 03de13a

Please sign in to comment.