Skip to content

Commit 18112a2

Browse files
committed
fix(cx_devices): fix issue with E2213 initial_press
related to #1292
1 parent 00ba608 commit 18112a2

3 files changed

Lines changed: 233 additions & 142 deletions

File tree

RELEASE_NOTES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ _This minor change does not contain any breaking changes._
1616
- [XYZ](https://BASE_URL/controllerx/controllers/XYZ) - add device with Z2M support. [ #123 ]
1717
-->
1818

19-
<!--
2019
## :hammer: Fixes
21-
-->
20+
21+
- [E2213](https://BASE_URL/controllerx/controllers/E2213) - fix initial_press issue. [ #1292 ]
2222

2323
<!--
2424
## :scroll: Docs

apps/controllerx/cx_devices/ikea.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -759,12 +759,10 @@ async def initialize(self) -> None:
759759
class E2213LightController(LightController):
760760
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
761761
return {
762-
"1_initial_press": Light.ON,
763-
"2_initial_press": Light.OFF,
764762
"1_long_press": Light.HOLD_BRIGHTNESS_UP,
765763
"2_long_press": Light.HOLD_BRIGHTNESS_DOWN,
766-
"1_short_release": Light.RELEASE,
767-
"2_short_release": Light.RELEASE,
764+
"1_short_release": Light.ON,
765+
"2_short_release": Light.OFF,
768766
"1_long_release": Light.RELEASE,
769767
"2_long_release": Light.RELEASE,
770768
"1_double_press": Light.HOLD_COLOR_UP,
@@ -775,12 +773,10 @@ def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
775773
class E2213Z2MLightController(Z2MLightController):
776774
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
777775
return {
778-
"1_initial_press": Z2MLight.ON,
779-
"2_initial_press": Z2MLight.OFF,
780776
"1_long_press": Z2MLight.HOLD_BRIGHTNESS_UP,
781777
"2_long_press": Z2MLight.HOLD_BRIGHTNESS_DOWN,
782-
"1_short_release": Z2MLight.RELEASE,
783-
"2_short_release": Z2MLight.RELEASE,
778+
"1_short_release": Z2MLight.ON,
779+
"2_short_release": Z2MLight.OFF,
784780
"1_long_release": Z2MLight.RELEASE,
785781
"2_long_release": Z2MLight.RELEASE,
786782
"1_double_press": Z2MLight.HOLD_COLOR_TEMP_UP,

0 commit comments

Comments
 (0)