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: