Skip to content

Commit

Permalink
EcoDim ED-10011 support (stas-demydiuk#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartrikers6224 authored Jun 9, 2021
1 parent 1c93266 commit b006f6d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SUPPORTED_DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ If your device is not listed in the list below but [zigbee2mqtt supports](https:
- Dresden Elektronik ZigBee Light Link wireless electronic ballast
- Dresden Elektronik ZigBee Light Link wireless electronic ballast color temperature

### EcoDim
- ED10011 - Zigbee 2 button wall switch - black

### EcoSmart
- EcoSmart A19 RGB bulb
- EcoSmart A19 bright white bulb
Expand Down Expand Up @@ -543,4 +546,4 @@ If your device is not listed in the list below but [zigbee2mqtt supports](https:
### Other
- Custom devices (DiY) DNCKAT single key wired wall light switch
- Custom devices (DiY) ZigUP
- DIYRuZ DIYRuZ_magnet
- DIYRuZ DIYRuZ_magnet
2 changes: 2 additions & 0 deletions adapters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from adapters.base_adapter import Adapter
from adapters.weiser_lock import WeiserLock
from adapters.bitron import bitron_adapters
from adapters.ecodim import ecodim_adapters
from adapters.feibit import feibit_adapters
from adapters.generic.thermostat import ThermostatAdapter
from adapters.gledopto import gledopto_adapters
Expand Down Expand Up @@ -51,6 +52,7 @@
'ptvo.switch': PtvoSwitch # cc2530 zigbee module with pvto.switch firmware (buttons only for now!)
},
**bitron_adapters,
**ecodim_adapters,
**feibit_adapters,
**gledopto_adapters,
**heiman_adapters,
Expand Down
7 changes: 7 additions & 0 deletions adapters/ecodim/__init__.py
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
}
19 changes: 19 additions & 0 deletions adapters/ecodim/zigbee2buttonwallswitchblack.py
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)

0 comments on commit b006f6d

Please sign in to comment.