diff --git a/homeassistant/components/motionblinds_ble/cover.py b/homeassistant/components/motionblinds_ble/cover.py index a8dd0e8bc0eb..83308be0f8db 100644 --- a/homeassistant/components/motionblinds_ble/cover.py +++ b/homeassistant/components/motionblinds_ble/cover.py @@ -7,12 +7,11 @@ from typing import Any, override from motionblindsble.const import MotionBlindType, MotionRunningType from homeassistant.components.cover import ( - ATTR_POSITION, - ATTR_TILT_POSITION, CoverDeviceClass, CoverEntity, CoverEntityDescription, CoverEntityFeature, + CoverServiceArgument, ) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -161,7 +160,7 @@ class PositionCover(MotionblindsBLECoverEntity): @override async def async_set_cover_position(self, **kwargs: Any) -> None: """Move the cover entity to a specific position.""" - new_position: int = 100 - int(kwargs[ATTR_POSITION]) + new_position: int = 100 - int(kwargs[CoverServiceArgument.POSITION]) _LOGGER.debug( "(%s) Setting position to %i", @@ -201,7 +200,7 @@ class TiltCover(MotionblindsBLECoverEntity): @override async def async_set_cover_tilt_position(self, **kwargs: Any) -> None: """Tilt the cover entity to a specific position.""" - new_tilt: int = 100 - int(kwargs[ATTR_TILT_POSITION]) + new_tilt: int = 100 - int(kwargs[CoverServiceArgument.TILT_POSITION]) _LOGGER.debug( "(%s) Setting tilt position to %i",