-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new device: IKEA SOMRIG E2213 #6574
Merged
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
dd161bf
initial commit of e2213
lorenzspenger 8b37e50
added missing trailing comma
lorenzspenger f9ec0b9
heimanSpecificScenes
lorenzspenger d6d5b68
Merge
lorenzspenger eb71b69
corrected indentation of comment
lorenzspenger 5872198
some more cosmetics
lorenzspenger a65b86a
when in comma-dangling-town…
lorenzspenger d476371
changed to tradfriButton cluster
lorenzspenger 1d2224a
trailing space removed
lorenzspenger 9ba6601
cleaned up the cleanup
lorenzspenger 538789d
Merge remote-tracking branch 'upstream/master' into e2213
lorenzspenger d73ae0b
changed cluster of Symfonisk to tradfriButton
lorenzspenger f05f755
Update ikea.ts
Koenkk 4f7a13a
Merge branch 'master' into e2213
Koenkk 16a1255
removed buttons prefix
lorenzspenger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,10 +281,26 @@ const fzLocal = { | |
} satisfies Fz.Converter, | ||
ikea_dots_click_v2: { | ||
// For remotes with firmware 1.0.32 (20221219) | ||
cluster: 'heimanSpecificScenes', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try with: cluster: 'tradfriButton',
type: ['commandAction1', 'commandAction2', 'commandAction3', 'commandAction4', 'commandAction6'], |
||
type: 'raw', | ||
convert: (model, msg, publish, options, meta) => { | ||
const button = utils.getFromLookup(msg.endpoint.ID, {2: '1', 3: '2'}); | ||
const lookup = { | ||
commandAction1: 'initial_press', | ||
commandAction2: 'long_press', | ||
commandAction3: 'short_release', | ||
commandAction4: 'long_release', | ||
commandAction6: 'double_press', | ||
}; | ||
const action = utils.getFromLookup(msg.type, lookup); | ||
return {action: `dots_${button}_${action}`}; | ||
}, | ||
} satisfies Fz.Converter, | ||
ikea_dots_click_v2_somrig: { | ||
cluster: 'tradfriButton', | ||
type: ['commandAction1', 'commandAction2', 'commandAction3', 'commandAction4', 'commandAction6'], | ||
convert: (model, msg, publish, options, meta) => { | ||
const button = utils.getFromLookup(msg.endpoint.ID, {2: '1', 3: '2'}); | ||
const button = utils.getFromLookup(msg.endpoint.ID, {1: '1', 2: '2'}); | ||
const lookup = { | ||
commandAction1: 'initial_press', | ||
commandAction2: 'long_press', | ||
|
@@ -597,10 +613,7 @@ const definitions: Definition[] = [ | |
model: 'LED1624G9', | ||
vendor: 'IKEA', | ||
description: 'TRADFRI LED bulb E14/E26/E27 600 lumen, dimmable, color, opal white', | ||
extend: tradfriExtend.light_onoff_brightness_colortemp_color({ | ||
disableColorTempStartup: true, | ||
colorTempRange: [153, 500], // light is pure RGB (XY), advertise 2000K-6500K | ||
}), | ||
extend: tradfriExtend.light_onoff_brightness_colortemp_color(), | ||
toZigbee: utils.replaceInArray( | ||
tradfriExtend.light_onoff_brightness_colortemp_color().toZigbee, | ||
[tz.light_color_colortemp], | ||
|
@@ -1019,15 +1032,7 @@ const definitions: Definition[] = [ | |
model: 'LED1923R5/LED1925G6', | ||
vendor: 'IKEA', | ||
description: 'TRADFRI LED bulb GU10 345 lumen, dimmable, white spectrum, color spectrum', | ||
extend: tradfriExtend.light_onoff_brightness_colortemp_color({ | ||
disableColorTempStartup: true, | ||
colorTempRange: [153, 500], | ||
}), | ||
toZigbee: utils.replaceInArray( | ||
tradfriExtend.light_onoff_brightness_colortemp_color().toZigbee, | ||
[tz.light_color_colortemp], | ||
[tz.light_color_and_colortemp_via_color], | ||
), | ||
extend: tradfriExtend.light_onoff_brightness_colortemp_color({colorTempRange: [250, 454]}), | ||
}, | ||
{ | ||
zigbeeModel: ['TRADFRI bulb E27 WS globe 1055lm'], | ||
|
@@ -1066,7 +1071,7 @@ const definitions: Definition[] = [ | |
extend: tradfriExtend.light_onoff_brightness_colortemp(), | ||
}, | ||
{ | ||
zigbeeModel: ['TRADFRI_bulb_GU10_WS_345lm', 'TRADFRI bulb GU10 WW 345lm'], | ||
zigbeeModel: ['TRADFRI_bulb_GU10_WS_345lm'], | ||
model: 'LED2106R3', | ||
vendor: 'IKEA', | ||
description: 'TRADFRI LED bulb GU10 345 lumen, dimmable, white spectrum', | ||
|
@@ -1274,6 +1279,27 @@ const definitions: Definition[] = [ | |
await reporting.illuminance(endpoint3); | ||
}, | ||
}, | ||
{ | ||
zigbeeModel: ['SOMRIG shortcut button'], | ||
model: 'E2213', | ||
vendor: 'IKEA', | ||
description: 'SOMRIG shortcut button', | ||
fromZigbee: [fz.battery, fzLocal.ikea_dots_click_v2_somrig], | ||
toZigbee: [tz.battery_percentage_remaining], | ||
exposes: [ | ||
e.battery().withAccess(ea.STATE_GET), e.action(['dots_1_initial_press', | ||
'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', | ||
'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release']), | ||
], | ||
ota: ota.tradfri, | ||
configure: async (device, coordinatorEndpoint, logger) => { | ||
const endpoint1 = device.getEndpoint(1); | ||
const endpoint2 = device.getEndpoint(2); | ||
await reporting.bind(endpoint1, coordinatorEndpoint, ['tradfriButton', 'genPollCtrl']); | ||
await reporting.bind(endpoint2, coordinatorEndpoint, ['tradfriButton']); | ||
await reporting.batteryVoltage(endpoint1); | ||
}, | ||
}, | ||
{ | ||
zigbeeModel: ['PARASOLL Door/Window Sensor'], | ||
model: 'E2013', | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this doesn't work anymore in the latest dev branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me as well. Must be an error from fetching upstream.