From 378a3151d4cd15c136912d85900d4c9e8bc90007 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 1 Oct 2025 10:07:30 +0000 Subject: [PATCH] cleanup --- homeassistant/components/tuya/cover.py | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/homeassistant/components/tuya/cover.py b/homeassistant/components/tuya/cover.py index 89eebee869fe..06db6e9fa255 100644 --- a/homeassistant/components/tuya/cover.py +++ b/homeassistant/components/tuya/cover.py @@ -2,7 +2,7 @@ from __future__ import annotations -from dataclasses import dataclass, replace +from dataclasses import dataclass from typing import TYPE_CHECKING, Any from tuya_sharing import CustomerDevice, Manager @@ -143,27 +143,6 @@ COVERS: dict[DeviceCategory, tuple[TuyaCoverEntityDescription, ...]] = { ), } -_QUIRKS: dict[str, dict[str, Any]] = { - # Quirks for devices where the standard descriptions don't work well - # Key is "{device.category}_{device.product_id}_{description.key}" - "cl_lfkr93x0ukp5gaia_control": { - # This model has percent_control / percent_state / situation_set - # but they never get updated - use control instead to get the state - "current_state": DPCode.CONTROL, - "current_position": None, - "set_position": None, - } -} - - -def _apply_quirk( - device: CustomerDevice, description: TuyaCoverEntityDescription -) -> TuyaCoverEntityDescription: - """Apply quirk for specific device.""" - if quirk := _QUIRKS.get(f"{device.category}_{device.product_id}_{description.key}"): - return replace(description, **quirk) - return description - def _create_quirk_description( definition: TuyaCoverDefinition, @@ -205,7 +184,7 @@ async def async_setup_entry( ) elif descriptions := COVERS.get(device.category): entities.extend( - TuyaCoverEntity(device, manager, _apply_quirk(device, description)) + TuyaCoverEntity(device, manager, description) for description in descriptions if ( description.key in device.function