Merge pull request #15 from eburtsev/master
Fixed 'int' object has no attribute 'isdigit' exception
This commit is contained in:
+2
-2
@@ -88,8 +88,8 @@ class Mqtt:
|
|||||||
if (model in self.event_based_sensors):
|
if (model in self.event_based_sensors):
|
||||||
retain = False
|
retain = False
|
||||||
# fix for rgb format
|
# fix for rgb format
|
||||||
if (key == "rgb" and value.isdigit()):
|
if (key == "rgb" and str(value).isdigit()):
|
||||||
value = self._color_xiaomi_to_rgb(value)
|
value = self._color_xiaomi_to_rgb(str(value))
|
||||||
items[key] = value
|
items[key] = value
|
||||||
|
|
||||||
if self.json == True:
|
if self.json == True:
|
||||||
|
|||||||
Reference in New Issue
Block a user