From 4a36318d56673b22f56630eb04919463444aec19 Mon Sep 17 00:00:00 2001 From: Everything Smart Home <53482654+EverythingSmartHome@users.noreply.github.com> Date: Wed, 13 Jul 2022 18:58:36 +0100 Subject: [PATCH] Add Aqara E1 curtain motor direction select entity to ZHA (#75132) * Add direction change select option for Aqara Curtain * Add direction change select option for Aqara Curtain --- homeassistant/components/zha/select.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/homeassistant/components/zha/select.py b/homeassistant/components/zha/select.py index 79349273e38..e2835d4acd4 100644 --- a/homeassistant/components/zha/select.py +++ b/homeassistant/components/zha/select.py @@ -264,3 +264,20 @@ class AqaraApproachDistance(ZCLEnumSelectEntity, id_suffix="approach_distance"): _select_attr = "approach_distance" _enum = AqaraApproachDistances + + +class AqaraE1ReverseDirection(types.enum8): + """Aqara curtain reversal.""" + + Normal = 0x00 + Inverted = 0x01 + + +@CONFIG_DIAGNOSTIC_MATCH( + channel_names="window_covering", models={"lumi.curtain.agl001"} +) +class AqaraCurtainMode(ZCLEnumSelectEntity, id_suffix="window_covering_mode"): + """Representation of a ZHA curtain mode configuration entity.""" + + _select_attr = "window_covering_mode" + _enum = AqaraE1ReverseDirection