Skip to content

Commit

Permalink
final linting - god send me the power to strike down the guy who inve…
Browse files Browse the repository at this point in the history
…nted that vscode plugin...
  • Loading branch information
JuniperChris929 committed Jan 30, 2024
1 parent ce5d4c6 commit ce359f2
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions lib/devices/gen3-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,13 +645,13 @@ function addSwitchToGen3Device(deviceObj, switchId, hasPowerMetering) {
mqtt_cmd: '<mqttprefix>/rpc',
mqtt_cmd_funct: (value, self) => {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Switch.SetConfig',
params: {
id: switchId,
config: { power_limit: value },
},
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Switch.SetConfig',
params: {
id: switchId,
config: { power_limit: value },
},
});
},
},
Expand All @@ -674,13 +674,13 @@ function addSwitchToGen3Device(deviceObj, switchId, hasPowerMetering) {
mqtt_cmd: '<mqttprefix>/rpc',
mqtt_cmd_funct: (value, self) => {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Switch.SetConfig',
params: {
id: switchId,
config: { current_limit: value },
},
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Switch.SetConfig',
params: {
id: switchId,
config: { current_limit: value },
},
});
},
},
Expand All @@ -703,13 +703,13 @@ function addSwitchToGen3Device(deviceObj, switchId, hasPowerMetering) {
mqtt_cmd: '<mqttprefix>/rpc',
mqtt_cmd_funct: (value, self) => {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Switch.SetConfig',
params: {
id: switchId,
config: { voltage_limit: value },
},
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Switch.SetConfig',
params: {
id: switchId,
config: { voltage_limit: value },
},
});
},
},
Expand Down Expand Up @@ -798,14 +798,14 @@ function addInputToGen3Device(deviceObj, inputId) {
valueObj?.params?.events
) {
for (const e in valueObj.params.events) {
const event = valueObj.params.events[e];
const event = valueObj.params.events[e];

if (
typeof event === 'object' &&
if (
typeof event === 'object' &&
event.component === `input:${inputId}`
) {
return event.event;
}
) {
return event.event;
}
}
}
return undefined;
Expand Down Expand Up @@ -999,17 +999,17 @@ function addCoverToGen3Device(deviceObj, coverId) {

if (duration > 0) {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Open',
params: { id: coverId, duration: duration },
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Open',
params: { id: coverId, duration: duration },
});
} else {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Open',
params: { id: coverId },
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Open',
params: { id: coverId },
});
}
},
Expand Down Expand Up @@ -1058,17 +1058,17 @@ function addCoverToGen3Device(deviceObj, coverId) {

if (duration > 0) {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Close',
params: { id: coverId, duration: duration },
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Close',
params: { id: coverId, duration: duration },
});
} else {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Close',
params: { id: coverId },
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.Close',
params: { id: coverId },
});
}
},
Expand Down

0 comments on commit ce359f2

Please sign in to comment.