Skip to content

Commit

Permalink
feat: Support scene transition times with a resolution of 100ms inste…
Browse files Browse the repository at this point in the history
…ad of 1 second (#6656)
  • Loading branch information
Flavien authored Dec 9, 2023
1 parent 05470a2 commit cc816f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/converters/toZigbee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4315,8 +4315,11 @@ const converters2 = {
);

if (isGroup || (utils.isObject(removeresp) && (removeresp.status === 0 || removeresp.status == 133 || removeresp.status == 139))) {
const addSceneCommand = Number.isInteger(transtime) ? 'add' : 'enhancedAdd';
const commandTransitionTime = addSceneCommand === 'enhancedAdd' ? Math.floor(transtime * 10) : transtime;

const response = await entity.command(
'genScenes', 'add', {groupid, sceneid, scenename: '', transtime, extensionfieldsets},
'genScenes', addSceneCommand, {groupid, sceneid, scenename: '', commandTransitionTime, extensionfieldsets},
utils.getOptions(meta.mapped, entity),
);

Expand Down

0 comments on commit cc816f4

Please sign in to comment.