Skip to content

Commit

Permalink
Merge pull request #1027 from xaviml/1014-new-device-support-for-shel…
Browse files Browse the repository at this point in the history
…ly-dimmer-2-as-a-controller

feat(device): add Shelly Dimmer 2 device
  • Loading branch information
xaviml authored Sep 10, 2024
2 parents c57c38e + 04a847f commit e9807ec
Show file tree
Hide file tree
Showing 3 changed files with 11 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 @@ -17,6 +17,7 @@ _This minor change does not contain any breaking changes._
- [E2213](https://BASE_URL/controllerx/controllers/E2213) - add device with Z2M support. [ #885 ]
- [Z31BRL](https://BASE_URL/controllerx/controllers/Z31BRL) - add Z2M support. [ #958 ]
- [E2123](https://BASE_URL/controllerx/controllers/E2123) - add Z2M and deCONZ support. [ #842 ]
- [ShellyDimmer2](https://BASE_URL/controllerx/controllers/ShellyDimmer2) - add Shelly support. [ #1014 ]

<!--
## :hammer: Fixes
Expand Down
10 changes: 10 additions & 0 deletions apps/controllerx/cx_devices/shelly.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ def get_shelly_actions_mapping(self) -> DefaultActionsMapping:
"btn_up_2": Light.RELEASE,
"double_push_2": Light.ON_MIN_BRIGHTNESS,
}


class ShellyDimmer2LightController(LightController):
def get_shelly_actions_mapping(self) -> DefaultActionsMapping:
return {
"single_1": Light.TOGGLE,
"single_2": None,
"long_1": Light.TOGGLE,
"long_2": None,
}
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 e9807ec

Please sign in to comment.