forked from stas-demydiuk/domoticz-zigbee2mqtt-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EcoDim ED-10011 support (stas-demydiuk#643)
- Loading branch information
1 parent
1c93266
commit b006f6d
Showing
4 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from adapters.base_adapter import Adapter | ||
from adapters.ecodim.zigbee2buttonwallswitchblack import Zigbee2ButtonWallSwitchBlack | ||
|
||
|
||
ecodim_adapters = { | ||
'ED-10011': Zigbee2ButtonWallSwitchBlack, # EcoDim Zigbee 2 button wall switch - black | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from adapters.adapter_with_battery import AdapterWithBattery | ||
from devices.switch.dimmer_switch import DimmerSwitch | ||
from devices.switch.selector_switch import SelectorSwitch | ||
|
||
class Zigbee2ButtonWallSwitchBlack(AdapterWithBattery): | ||
def __init__(self, devices): | ||
super().__init__(devices) | ||
self.devices.append(DimmerSwitch(devices, 'dimmer', 'brightness')) | ||
|
||
self.switch = SelectorSwitch(devices, 'switch', 'action') | ||
self.switch.add_level('Off', 'off') | ||
self.switch.add_level('On', 'on') | ||
self.switch.add_level('Up', 'brightness_move_up') | ||
self.switch.add_level('Down', 'brightness_move_down') | ||
self.switch.add_level('Stop', 'brightness_stop') | ||
self.switch.set_selector_style(SelectorSwitch.SELECTOR_TYPE_MENU) | ||
self.switch.disable_value_check_on_update() | ||
|
||
self.devices.append(self.switch) |