Skip to content

Commit

Permalink
fix default unit is None
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 9, 2022
1 parent b5a2940 commit d54a95d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miio/devicestatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __getattr__(self, item):
return getattr(self._embedded[embed], prop)


def sensor(name: str, *, unit: str = "", **kwargs):
def sensor(name: str, *, unit: Optional[str] = None, **kwargs):
"""Syntactic sugar to create SensorDescriptor objects.
The information can be used by users of the library to programmatically find out what
Expand Down

0 comments on commit d54a95d

Please sign in to comment.