Skip to content

Commit

Permalink
repair mute again and add debug logging...
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed Nov 30, 2023
1 parent 693a916 commit 6297699
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/converters/media_player.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ exports.processMediaPlayer = function (id, control, name, room, func, _obj, obje
entity.context.COMMANDS.push({
service: 'volume_mute',
setId: state.id,
parseCommand: (entity, command, data, user) =>
new Promise((resolve, reject) =>
adapterData.adapter.setForeignState(command.setId, !data.service_data.is_volume_muted, false, {user}, err =>
err ? reject(err) : resolve()))
parseCommand: async (entity, command, data, user) => {
adapterData.log.debug('Got volume_mute command: ' + JSON.stringify(command) + ' controlling mute with ' + data.service_data.is_volume_muted + ' from ' + JSON.stringify(data));
await adapterData.adapter.setForeignStateAsync(command.setId, data.service_data.is_volume_muted, false, {user});
}
});

utils.addID2entity(state.id, entity);
Expand Down

0 comments on commit 6297699

Please sign in to comment.