Skip to content

Commit

Permalink
Merge pull request #877 from aommm/main
Browse files Browse the repository at this point in the history
add RDM001 (Philips) ZHA support
  • Loading branch information
xaviml authored Mar 30, 2024
2 parents 6cb9fd5 + 8d086ca commit 766c059
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions apps/controllerx/cx_devices/philips.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,22 @@ def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
2003: Light.RELEASE,
}

def get_zha_actions_mapping(self) -> DefaultActionsMapping:
return {
# "left_press": Light.TOGGLE,
"left_press_release": Light.TOGGLE,
"left_hold": Light.HOLD_BRIGHTNESS_TOGGLE,
"left_hold_release": Light.RELEASE,
# "right_press": Light.TOGGLE,
"right_press_release": Light.TOGGLE,
"right_hold": Light.HOLD_BRIGHTNESS_TOGGLE,
"right_hold_release": Light.RELEASE,
}

def get_zha_action(self, data: EventData) -> str:
command: str = data["command"]
return command


class Philips929003017102Z2MLightController(Z2MLightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
Expand Down

0 comments on commit 766c059

Please sign in to comment.