From c9136aa7e3706c678b1d5d321efbc44beb5f620a Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 2 Dec 2026 14:25:00 +0100 Subject: [PATCH] Use the action field enums in motionblinds_ble (#196017) --- homeassistant/components/motionblinds_ble/cover.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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",