From 35f97368e9039684981483530cba64098723eaa8 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Tue, 14 Jul 2020 15:40:01 +0200 Subject: [PATCH] unwrap the response --- miio/vacuum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miio/vacuum.py b/miio/vacuum.py index caa2e33ba..d1fb1edab 100644 --- a/miio/vacuum.py +++ b/miio/vacuum.py @@ -540,7 +540,7 @@ def locale(self): @command() def timezone(self): """Get the timezone.""" - res = self.send("get_timezone") + res = self.send("get_timezone")[0] if isinstance(res, dict): # Xiaowa E25 example # {'olson': 'Europe/Berlin', 'posix': 'CET-1CEST,M3.5.0,M10.5.0/3'} @@ -550,7 +550,7 @@ def timezone(self): return res["olson"] # Gen1 vacuum: ['Europe/Berlin'] - return res[0] + return res def set_timezone(self, new_zone): """Set the timezone."""