diff --git a/miio/gateway.py b/miio/gateway.py index e8d4ee768..96b158852 100644 --- a/miio/gateway.py +++ b/miio/gateway.py @@ -380,7 +380,12 @@ def timezone(self): @command() def get_illumination(self): """Get illumination. In lux?""" - return self.send("get_illumination").pop() + try: + return self.send("get_illumination").pop() + except Exception as ex: + raise GatewayException( + "Got an exception while getting gateway illumination" + ) from ex class GatewayDevice(Device):