Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
Don't set empty unit
Browse files Browse the repository at this point in the history
  • Loading branch information
elupus committed Feb 25, 2023
1 parent fae49dd commit 9bf618e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_unit(
if not parameter_id:
return None
data = self._system.get_parameter(parameter_id)
if data is None or data["unit"] is None:
if data is None or not data["unit"]:
return default
else:
return data["unit"]
Expand Down

0 comments on commit 9bf618e

Please sign in to comment.