Add quirk for g1cp07dsqnbdbbki

This commit is contained in:
epenet
2025-11-03 08:29:40 +00:00
parent 378a3151d4
commit 04c9d55e03
3 changed files with 18 additions and 2 deletions
@@ -16,6 +16,22 @@ __all__ = [
TUYA_QUIRKS_REGISTRY = QuirksRegistry()
(
# This model has percent_state and percent_control but percent_state never
# gets updated - force percent_control instead
DeviceQuirk()
.applies_to(category="cl", product_id="g1cp07dsqnbdbbki")
.add_cover(
key="control",
translation_key="curtain",
translation_string="curtain",
current_state_dp_code="control",
current_position_dp_code="percent_control",
set_position_dp_code="percent_control",
device_class=TuyaCoverDeviceClass.CURTAIN,
)
.register(TUYA_QUIRKS_REGISTRY)
)
(
# This model has percent_control / percent_state / situation_set
# but they never get updated - use control instead to get the state
@@ -93,7 +93,7 @@
"control": "open",
"work_state": "opening",
"percent_state": 0,
"percent_control": 100,
"percent_control": 62,
"control_back_mode": "back",
"border": "up"
},
@@ -493,7 +493,7 @@
# name: test_platform_setup_and_discovery[cover.persiana_do_quarto_curtain-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_position': 100,
'current_position': 38,
'device_class': 'curtain',
'friendly_name': 'Persiana do Quarto Curtain',
'supported_features': <CoverEntityFeature: 15>,