Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _This minor change does not contain any breaking changes._
<!--
## :video_game: New devices

- [XYZ](https://BASE_URL/controllerx/controllers/XYZ) - add device with Z2M support. [ #123 ]
- [Namron4512773](https://BASE_URL/controllerx/controllers/Namron4512773) - add device with Z2M support. [ #123 ]
-->

<!--
Expand Down
1 change: 1 addition & 0 deletions apps/controllerx/controllerx.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from cx_devices.livarno import *
from cx_devices.lutron import *
from cx_devices.muller_licht import *
from cx_devices.namron import *
from cx_devices.osram import *
from cx_devices.philips import *
from cx_devices.prolight import *
Expand Down
54 changes: 54 additions & 0 deletions apps/controllerx/cx_devices/namron.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from cx_const import DefaultActionsMapping, Light, Z2MLight
from cx_core import LightController, Z2MLightController


class Namron4512773LightController(LightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
return {
"on_l1": Light.ON,
"off_l1": Light.OFF,
"brightness_move_up_l1": Light.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l1": Light.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l1": Light.RELEASE,
"on_l2": Light.ON,
"off_l2": Light.OFF,
"brightness_move_up_l2": Light.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l2": Light.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l2": Light.RELEASE,
"on_l3": Light.ON,
"off_l3": Light.OFF,
"brightness_move_up_l3": Light.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l3": Light.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l3": Light.RELEASE,
"on_l4": Light.ON,
"off_l4": Light.OFF,
"brightness_move_up_l4": Light.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l4": Light.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l4": Light.RELEASE,
}


class Namron4512773Z2MLightController(Z2MLightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
return {
"on_l1": Z2MLight.ON,
"off_l1": Z2MLight.OFF,
"brightness_move_up_l1": Z2MLight.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l1": Z2MLight.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l1": Z2MLight.RELEASE,
"on_l2": Z2MLight.ON,
"off_l2": Z2MLight.OFF,
"brightness_move_up_l2": Z2MLight.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l2": Z2MLight.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l2": Z2MLight.RELEASE,
"on_l3": Z2MLight.ON,
"off_l3": Z2MLight.OFF,
"brightness_move_up_l3": Z2MLight.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l3": Z2MLight.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l3": Z2MLight.RELEASE,
"on_l4": Z2MLight.ON,
"off_l4": Z2MLight.OFF,
"brightness_move_up_l4": Z2MLight.HOLD_BRIGHTNESS_UP,
"brightness_move_down_l4": Z2MLight.HOLD_BRIGHTNESS_DOWN,
"brightness_stop_l4": Z2MLight.RELEASE,
}
Binary file added docs/docs/assets/controllers/Namron4512773.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.