From e6bce68641f000725f60cceb6dff09641393368d Mon Sep 17 00:00:00 2001 From: Eugene Burtsev Date: Tue, 27 Feb 2018 15:21:11 +0300 Subject: [PATCH] Fixed 'int' object has no attribute 'isdigit' exception --- src/mqtt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqtt.py b/src/mqtt.py index 4d62667..799f7f5 100644 --- a/src/mqtt.py +++ b/src/mqtt.py @@ -88,8 +88,8 @@ class Mqtt: if (model in self.event_based_sensors): retain = False # fix for rgb format - if (key == "rgb" and value.isdigit()): - value = self._color_xiaomi_to_rgb(value) + if (key == "rgb" and str(value).isdigit()): + value = self._color_xiaomi_to_rgb(str(value)) items[key] = value if self.json == True: