toggleDevicePowerState: renamed to toggleDevicePowerState

This commit is contained in:
Martín M
2020-10-21 21:11:39 -03:00
parent ac80e06b0f
commit bf6ab11590
2 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ const { makeRequest } = require('./makeRequest');
const { openWebSocket } = require('./openWebSocket');
const { saveDevicesCache } = require('./saveDevicesCache');
const { setDevicePowerState } = require('./setDevicePowerState');
const { toggleDevice } = require('./toggleDevice');
const { toggleDevicePowerState } = require('./toggleDevicePowerState');
const mixins = {
checkDevicesUpdates,
@@ -37,7 +37,7 @@ const mixins = {
openWebSocket,
saveDevicesCache,
setDevicePowerState,
toggleDevice,
toggleDevicePowerState,
};
module.exports = mixins;

View File

@@ -7,7 +7,7 @@ module.exports = {
*
* @returns {Promise<{state: *, status: string}|{msg: string, error: *}>}
*/
async toggleDevice(deviceId, channel = 1) {
async toggleDevicePowerState(deviceId, channel = 1) {
return this.setDevicePowerState(deviceId, 'toggle', channel);
},
};