diff --git a/SUPPORTED_DEVICES.md b/SUPPORTED_DEVICES.md index ae4a100a..257107d1 100644 --- a/SUPPORTED_DEVICES.md +++ b/SUPPORTED_DEVICES.md @@ -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 @@ -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 \ No newline at end of file +- DIYRuZ DIYRuZ_magnet diff --git a/adapters/__init__.py b/adapters/__init__.py index ca0762bf..fea485ef 100755 --- a/adapters/__init__.py +++ b/adapters/__init__.py @@ -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 @@ -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, diff --git a/adapters/ecodim/__init__.py b/adapters/ecodim/__init__.py new file mode 100644 index 00000000..a308c7cc --- /dev/null +++ b/adapters/ecodim/__init__.py @@ -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 +} diff --git a/adapters/ecodim/zigbee2buttonwallswitchblack.py b/adapters/ecodim/zigbee2buttonwallswitchblack.py new file mode 100644 index 00000000..1e677066 --- /dev/null +++ b/adapters/ecodim/zigbee2buttonwallswitchblack.py @@ -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)