Lint and code style fixes

This commit is contained in:
swevictor 2023-10-06 14:11:23 +02:00
parent 1f2c2df5ca
commit 9146f9c7d3
3 changed files with 28 additions and 14 deletions

View file

@ -55,9 +55,13 @@ class DeviceRegistry {
/** @param outputDevice {import('types/DeviceRegistry').OutputDevice} */
addOutputDevice(outputDevice) {
const alreadyExistingBLEDevice = this.getOutputDeviceByBleOutputAddress(outputDevice.bleOutputAddress);
const alreadyExistingBLEDevice = this.getOutputDeviceByBleOutputAddress(
outputDevice.bleOutputAddress,
);
if (alreadyExistingBLEDevice) {
logger.warn(`Device with output id ${outputDevice.bleOutputAddress} already exists named ${alreadyExistingBLEDevice.name}. These two devices are probably grouped in the Plejd app. If this seems to be an error, please log a GitHub issue.`);
logger.warn(
`Device with output id ${outputDevice.bleOutputAddress} already exists named ${alreadyExistingBLEDevice.name}. These two devices are probably grouped in the Plejd app. If this seems to be an error, please log a GitHub issue.`,
);
logger.info(`NOT adding ${outputDevice.name} to device registry`);
logger.verbose(`Details of device NOT added: ${JSON.stringify(outputDevice)}`);
return;
@ -195,7 +199,6 @@ class DeviceRegistry {
return this.mainBleIdByDeviceId[deviceId];
}
/**
* @param {string } deviceId The physical device serial number
* @return {import('./types/ApiSite').Device}