Bläddra i källkod

Handle entity category of None when converting.

#153
Jason Rumney 3 år sedan
förälder
incheckning
e768014c77

+ 5 - 1
custom_components/tuya_local/helpers/mixin.py

@@ -53,7 +53,11 @@ class TuyaLocalEntity:
     @property
     def entity_category(self):
         """Return the entitiy's category."""
-        return EntityCategory(self._config.entity_category)
+        return (
+            None
+            if self._config.entity_category is None
+            else EntityCategory(self._config.entity_category)
+        )
 
     @property
     def icon(self):

+ 1 - 1
custom_components/tuya_local/manifest.json

@@ -2,7 +2,7 @@
     "domain": "tuya_local",
     "iot_class": "local_polling",
     "name": "Tuya Local",
-    "version": "0.16.0",
+    "version": "0.16.2",
     "documentation": "https://github.com/make-all/tuya-local",
     "issue_tracker": "https://github.com/make-all/tuya-local/issues",
     "dependencies": [],