Fixed 'int' object has no attribute 'isdigit' exception

This commit is contained in:
Eugene Burtsev
2018-02-27 15:21:11 +03:00
parent b9e940e9de
commit e6bce68641
+2 -2
View File
@@ -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: