From 0461eda83b39d07308a240b416066edd8704ac9f Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 25 Jun 2022 00:34:49 +0200 Subject: [PATCH] Adjust demo cover position methods (#73944) --- homeassistant/components/demo/cover.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/demo/cover.py b/homeassistant/components/demo/cover.py index 79a51406857..5c908dfa33a 100644 --- a/homeassistant/components/demo/cover.py +++ b/homeassistant/components/demo/cover.py @@ -205,9 +205,9 @@ class DemoCover(CoverEntity): self._listen_cover_tilt() self._requested_closing_tilt = False - async def async_set_cover_position(self, **kwargs): + async def async_set_cover_position(self, **kwargs: Any) -> None: """Move the cover to a specific position.""" - position = kwargs.get(ATTR_POSITION) + position: int = kwargs[ATTR_POSITION] self._set_position = round(position, -1) if self._position == position: return @@ -215,9 +215,9 @@ class DemoCover(CoverEntity): self._listen_cover() self._requested_closing = position < self._position - async def async_set_cover_tilt_position(self, **kwargs): + async def async_set_cover_tilt_position(self, **kwargs: Any) -> None: """Move the cover til to a specific position.""" - tilt_position = kwargs.get(ATTR_TILT_POSITION) + tilt_position: int = kwargs[ATTR_TILT_POSITION] self._set_tilt_position = round(tilt_position, -1) if self._tilt_position == tilt_position: return