Skip to content

Commit

Permalink
feat(device): add HM-Sen-MDIR-WM55 with HomeMatic support
Browse files Browse the repository at this point in the history
related to #421
  • Loading branch information
xaviml committed Apr 15, 2022
1 parent e434da8 commit 40ee3dd
Show file tree
Hide file tree
Showing 5 changed files with 35 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 @@ -43,6 +43,7 @@ PRERELEASE_NOTE
- [HM-PB-2-WM55-2](https://xaviml.github.io/controllerx/controllers/HM-PB-2-WM55-2) - add device with Homematic support [ #421 ]
- [HM-PBI-4-FM](https://xaviml.github.io/controllerx/controllers/HM-PBI-4-FM) - add device with Homematic support [ #421 ]
- [HM-PB-6-WM55](https://xaviml.github.io/controllerx/controllers/HM-PB-6-WM55) - add device with Homematic support [ #421 ]
- [HM-Sen-MDIR-WM55](https://xaviml.github.io/controllerx/controllers/HM-Sen-MDIR-WM55) - add device with Homematic support [ #421 ]
- [PTM215X](https://xaviml.github.io/controllerx/controllers/PTM215X) - Add Z2M support [ #420 ]
- [SNZB-01](https://xaviml.github.io/controllerx/controllers/SNZB-01) - Add Z2M support [ #460 ]
- [ZNXNKG02LM](https://xaviml.github.io/controllerx/controllers/ZNXNKG02LM) - Add Z2M support as a Light and Media Player controller [ #430 ]
10 changes: 10 additions & 0 deletions apps/controllerx/cx_devices/homematic.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,13 @@ def get_homematic_actions_mapping(self) -> DefaultActionsMapping:
"PRESS_LONG_6": Light.HOLD_COLOR_UP,
"PRESS_LONG_RELEASE_6": Light.RELEASE,
}


class HMSenMDIRWM55LightController(LightController):
def get_homematic_actions_mapping(self) -> DefaultActionsMapping:
return {
"PRESS_SHORT_1": Light.OFF,
"PRESS_LONG_1": Light.CLICK_BRIGHTNESS_DOWN,
"PRESS_SHORT_2": Light.ON,
"PRESS_LONG_2": Light.CLICK_BRIGHTNESS_UP,
}
19 changes: 19 additions & 0 deletions docs/_data/controllers/HM-Sen-MDIR-WM55.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: HM-Sen-MDIR-WM55 (Homematic)
device_support:
- type: Light
domain: light
controller: HMSenMDIRWM55LightController
delay: 350
mapping:
- Click button 1 → Turn off
- Hold button 1 → Dim down (1 step)
- Click button 2 → Turn on
- Hold button 2 → Brighten up (1 step)
integrations:
- name: Homematic
codename: homematic
actions:
- PRESS_SHORT_1 → Click button 1
- PRESS_LONG_1 → Hold button 1
- PRESS_SHORT_2 → Click button 2
- PRESS_LONG_2 → Hold button 2
Binary file added docs/assets/img/HM-Sen-MDIR-WM55.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/controllers/HM-Sen-MDIR-WM55.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: controller
title: HM-Sen-MDIR-WM55 (Homematic)
device: HM-Sen-MDIR-WM55
---

0 comments on commit 40ee3dd

Please sign in to comment.