Skip to content

Commit

Permalink
feat(device): add E1766 device support (deCONZ) for Light, Switch and…
Browse files Browse the repository at this point in the history
… Cover
  • Loading branch information
xaviml committed Apr 30, 2020
1 parent 6c76a10 commit 1e1efa3
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
23 changes: 23 additions & 0 deletions apps/controllerx/devices/ikea.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,26 @@ def get_zha_actions_mapping(self) -> TypeActionsMapping:

def default_delay(self) -> int:
return 1000


class E1766LightController(LightController):
def get_deconz_actions_mapping(self) -> TypeActionsMapping:
return {
1002: Light.ON,
1003: Light.ON_FULL_BRIGHTNESS,
2002: Light.OFF,
2003: Light.ON_MIN_BRIGHTNESS,
}


class E1766SwitchController(SwitchController):
def get_deconz_actions_mapping(self) -> TypeActionsMapping:
return {1002: Switch.ON, 2002: Switch.OFF}


class E1766CoverController(CoverController):
def get_deconz_actions_mapping(self) -> TypeActionsMapping:
return {
1002: Cover.TOGGLE_OPEN,
2002: Cover.TOGGLE_CLOSE,
}
30 changes: 30 additions & 0 deletions docs/_data/controllers/E1766.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: E1766 (IKEA)
device_support:
- type: Light
controller: E1766Controller
delay: 350
mapping:
- "Click up 🠖 Turn on"
- "Click down 🠖 Turn off"
- "Hold up 🠖 Full brightness"
- "Hold down 🠖 Minimum brightness"
- type: Switch
controller: E1766SwitchController
mapping:
- "Click up 🠖 Turn on"
- "Click down 🠖 Turn off"
- type: Cover
controller: E1766CoverController
mapping:
- "Click up 🠖 Open/Stop cover"
- "Click down 🠖 Close/Stop cover"
- "Hold up 🠖 Open cover"
- "Hold down 🠖 Close cover"
integrations:
- name: deCONZ
codename: deconz
actions:
- "1002 🠖 Click up"
- "2002 🠖 Click down"
- "1003 🠖 Hold up"
- "2003 🠖 Hold down"
Binary file added docs/assets/img/E1766.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/E1766.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: controller
title: E1766 (IKEA)
device: E1766
---

0 comments on commit 1e1efa3

Please sign in to comment.