mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Fix late comment correcting kwargs should always be Any in deCONZ covers (#59997)
* Fix late comments correcting kwargs should always be Any
This commit is contained in:
parent
da68cfa821
commit
6f091d235f
@ -3,7 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import ValuesView
|
from collections.abc import ValuesView
|
||||||
from typing import Any
|
from typing import Any, cast
|
||||||
|
|
||||||
from pydeconz.light import Cover
|
from pydeconz.light import Cover
|
||||||
|
|
||||||
@ -108,9 +108,9 @@ class DeconzCover(DeconzDevice, CoverEntity):
|
|||||||
"""Return if the cover is closed."""
|
"""Return if the cover is closed."""
|
||||||
return not self._device.is_open
|
return not self._device.is_open
|
||||||
|
|
||||||
async def async_set_cover_position(self, **kwargs: int) -> None:
|
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
||||||
"""Move the cover to a specific position."""
|
"""Move the cover to a specific position."""
|
||||||
position = 100 - kwargs[ATTR_POSITION]
|
position = 100 - cast(int, kwargs[ATTR_POSITION])
|
||||||
await self._device.set_position(lift=position)
|
await self._device.set_position(lift=position)
|
||||||
|
|
||||||
async def async_open_cover(self, **kwargs: Any) -> None:
|
async def async_open_cover(self, **kwargs: Any) -> None:
|
||||||
@ -132,9 +132,9 @@ class DeconzCover(DeconzDevice, CoverEntity):
|
|||||||
return 100 - self._device.tilt # type: ignore[no-any-return]
|
return 100 - self._device.tilt # type: ignore[no-any-return]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
async def async_set_cover_tilt_position(self, **kwargs: int) -> None:
|
async def async_set_cover_tilt_position(self, **kwargs: Any) -> None:
|
||||||
"""Tilt the cover to a specific position."""
|
"""Tilt the cover to a specific position."""
|
||||||
position = 100 - kwargs[ATTR_TILT_POSITION]
|
position = 100 - cast(int, kwargs[ATTR_TILT_POSITION])
|
||||||
await self._device.set_position(tilt=position)
|
await self._device.set_position(tilt=position)
|
||||||
|
|
||||||
async def async_open_cover_tilt(self, **kwargs: Any) -> None:
|
async def async_open_cover_tilt(self, **kwargs: Any) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user