Skip to content

Commit

Permalink
Merge pull request #658 from xaviml/648-add-support-for-adeo-hr-c99c-…
Browse files Browse the repository at this point in the history
…z-c045-zigbee2mqtt

feat(device): add ADEOHRC99CZC045 device with Z2M support
  • Loading branch information
xaviml authored Dec 31, 2022
2 parents 4e90dca + 0e388e3 commit bae0457
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ _This minor change does not contain any breaking changes._
## :video_game: New devices

- [Philips929002398602](https://BASE_URL/controllerx/controllers/Philips929002398602) - add ZHA support. [ #580 ] @cznewt @ScratMan
- [ADEOHRC99CZC045](https://BASE_URL/controllerx/controllers/ADEOHRC99CZC045) - add device with Z2M support. [ #648 ]
1 change: 1 addition & 0 deletions apps/controllerx/controllerx.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
SwitchController,
Z2MLightController,
)
from cx_devices.adeo import *
from cx_devices.aqara import *
from cx_devices.aurora import *
from cx_devices.homematic import *
Expand Down
46 changes: 46 additions & 0 deletions apps/controllerx/cx_devices/adeo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from cx_const import DefaultActionsMapping, Light, Z2MLight
from cx_core import LightController, Z2MLightController


class ADEOHRC99CZC045LightController(LightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
return {
"on": Light.ON,
"off": Light.OFF,
"brightness_step_up": Light.HOLD_BRIGHTNESS_UP,
"brightness_step_down": Light.HOLD_BRIGHTNESS_DOWN,
"brightness_stop": Light.RELEASE,
"color_hue_step_up": Light.HOLD_COLOR_UP,
"color_hue_step_down": Light.HOLD_COLOR_DOWN,
"color_saturation_step_up": Light.HOLD_COLOR_UP,
"color_saturation_step_down": Light.HOLD_COLOR_DOWN,
"color_temperature_step_up": Light.HOLD_COLOR_TEMP_UP,
"color_temperature_step_down": Light.HOLD_COLOR_TEMP_DOWN,
"color_stop": Light.RELEASE,
# "scene_1": "",
# "scene_2": "",
# "scene_3": "",
# "scene_4": "",
}


class ADEOHRC99CZC045Z2MLightController(Z2MLightController):
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
return {
"on": Z2MLight.ON,
"off": Z2MLight.OFF,
"brightness_step_up": Z2MLight.HOLD_BRIGHTNESS_UP,
"brightness_step_down": Z2MLight.HOLD_BRIGHTNESS_DOWN,
"brightness_stop": Z2MLight.RELEASE,
"color_hue_step_up": Z2MLight.HOLD_COLOR_TEMP_UP,
"color_hue_step_down": Z2MLight.HOLD_COLOR_TEMP_DOWN,
"color_saturation_step_up": Z2MLight.HOLD_COLOR_TEMP_UP,
"color_saturation_step_down": Z2MLight.HOLD_COLOR_TEMP_DOWN,
"color_temperature_step_up": Z2MLight.HOLD_COLOR_TEMP_UP,
"color_temperature_step_down": Z2MLight.HOLD_COLOR_TEMP_DOWN,
"color_stop": Z2MLight.RELEASE,
# "scene_1": "",
# "scene_2": "",
# "scene_3": "",
# "scene_4": "",
}
Binary file added docs/docs/assets/controllers/ADEOHRC99CZC045.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bae0457

Please sign in to comment.