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 <me@dje.li>
This commit is contained in:
Avi Miller 2021-11-21 17:31:45 +11:00 committed by GitHub
parent 23f37d0127
commit e056f9aa0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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