-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(device): add Z2M support for E1E-G7F
related to #355
- Loading branch information
Showing
6 changed files
with
56 additions
and
3 deletions.
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,18 @@ | ||
from cx_const import DefaultActionsMapping, Light | ||
from cx_core import LightController | ||
|
||
|
||
class E1EG7FLightController(LightController): | ||
def get_z2m_actions_mapping(self) -> DefaultActionsMapping: | ||
return { | ||
"on": Light.ON, | ||
"on_long": Light.CLICK_COLOR_UP, | ||
"on_double": Light.ON_FULL_COLOR_TEMP, | ||
"up": Light.CLICK_BRIGHTNESS_UP, | ||
"up_long": Light.ON_FULL_BRIGHTNESS, | ||
"down": Light.CLICK_BRIGHTNESS_DOWN, | ||
"down_long": Light.ON_MIN_BRIGHTNESS, | ||
"off": Light.OFF, | ||
"off_long": Light.CLICK_COLOR_DOWN, | ||
"off_double": Light.ON_MIN_COLOR_TEMP, | ||
} |
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,31 @@ | ||
name: E1E-G7F (Sengled) | ||
device_support: | ||
- type: Light | ||
domain: light | ||
controller: E1EG7FLightController | ||
delay: 350 | ||
mapping: | ||
- 'Click "ON" → Turn on' | ||
- 'Hold "ON" → Color temp up / Right color wheel (1 step)' | ||
- 'Double click "ON" → Full color temp' | ||
- "Click 🔆 → Brighten up (1 step)" | ||
- "Hold 🔆→ Full brightness" | ||
- "Click 🔅 → Dim down (1 step)" | ||
- "Hold 🔅 → Min brightness" | ||
- 'Click "OFF" → Turn off' | ||
- 'Hold "OFF" → Color temp down / Left color wheel (1 step)' | ||
- 'Double click "OFF" → Min color temp' | ||
integrations: | ||
- name: Zigbee2MQTT | ||
codename: z2m | ||
actions: | ||
- '"on" → Click "ON"' | ||
- 'on_long → Hold "ON"' | ||
- 'on_double → Double click "ON"' | ||
- 'up → Click 🔆' | ||
- 'up_long → Hold 🔆' | ||
- 'down → Click 🔅' | ||
- 'down_long → Hold 🔅' | ||
- '"off" → Click "OFF"' | ||
- 'off_long → Hold "OFF"' | ||
- 'off_double → Double click "OFF"' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 @@ | ||
--- | ||
layout: controller | ||
title: E1E-G7F (Sengled) | ||
device: E1EG7F | ||
--- |