From e056f9aa0f0a8c09568a1b084a19df5b37beebd8 Mon Sep 17 00:00:00 2001 From: Avi Miller Date: Sun, 21 Nov 2021 17:31:45 +1100 Subject: [PATCH] Explicitly cast the SOMA API response to an integer (#60071) This resolves the `TypeError: unsupported operand type(s) for -: 'int' and 'str'` error. Fixes #60070. Signed-off-by: Avi Miller --- homeassistant/components/soma/cover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/soma/cover.py b/homeassistant/components/soma/cover.py index 1005bf32f20..43ea60d372e 100644 --- a/homeassistant/components/soma/cover.py +++ b/homeassistant/components/soma/cover.py @@ -87,5 +87,5 @@ class SomaCover(SomaEntity, CoverEntity): ) self.is_available = False return - self.current_position = 100 - response["position"] + self.current_position = 100 - int(response["position"]) self.is_available = True