From d54a95dd9f2ad12389a859ab1071582e7edae233 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Wed, 9 Nov 2022 23:03:49 +0100 Subject: [PATCH] fix default unit is None --- miio/devicestatus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miio/devicestatus.py b/miio/devicestatus.py index 66f605f4d..f38c3d9b5 100644 --- a/miio/devicestatus.py +++ b/miio/devicestatus.py @@ -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