Skip to content

Commit

Permalink
Integration of E1812 Ikea Shortcut Button with Deconz (#296)
Browse files Browse the repository at this point in the history
* Added Deconz Action Mappings for E1812LightController
* Added E1812SwitchController Mappings for Deconz
  • Loading branch information
schneekluth committed May 3, 2021
1 parent 687e992 commit d67afc9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/controllerx/cx_devices/ikea.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,19 @@ def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
"brightness_stop": Light.RELEASE,
}

def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
return {
1002: Light.TOGGLE,
1001: Light.HOLD_BRIGHTNESS_TOGGLE,
1003: Light.RELEASE,
}

class E1812SwitchController(SwitchController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
return {"on": Switch.TOGGLE}

def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
return {1002: Switch.TOGGLE}

class W2049LightController(LightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
Expand Down
6 changes: 6 additions & 0 deletions docs/_data/controllers/E1812.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ integrations:
- "on → Click"
- "brightness_move_up → Hold"
- "brightness_stop → Released after being held"
- name: deCONZ
codename: deconz
actions:
- "1002 → Click"
- "1001 → Hold"
- "1003 → Released after being held"

0 comments on commit d67afc9

Please sign in to comment.