-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.11 #2363
base: master
Are you sure you want to change the base?
1.11 #2363
Conversation
This reverts commit 3b0264e.
* (asgothian) Fix Pairing * (asgothian) change ping * (asgothian) delay map generation until refresh is activated * (asgothian) remove bindings tab from zigbee tab * (asgothian) reorder tabs in configuration * (asgothian) remove binding tab from configuration * (asgothian) remove map from configuration * (asgothian) add debug to zigbee tab (work in progress)
Allow use of legacy device definition through exposes functionality
console.warn('toggleDebugDevices with id ' + id); | ||
sendTo(namespace, 'setDeviceDebug', {id:id}, function (msg) { | ||
sendTo(namespace, 'getDebugDevices', {}, function(msg) { | ||
if (msg && typeof (msg.debugDevices == 'array')) { |
Check warning
Code scanning / CodeQL
Useless conditional Warning
|
||
function getDevices() { | ||
getCoordinatorInfo(); | ||
sendTo(namespace, 'getDebugDevices', {}, function(msg) { | ||
if (msg && typeof (msg.debugDevices == 'array')) { |
Check warning
Code scanning / CodeQL
Useless conditional Warning
status = (dev.link_quality > 0 && isActive) ? `<div class="col tool"><i class="material-icons icon-green">check_circle</i></div>` : (groupImage || !isActive ? '' : `<div class="col tool"><i class="material-icons icon-black">leak_remove</i></div>`), | ||
permitJoinBtn = (isActive && dev.info && dev.info.device._type === 'Router') ? '<button name="join" class="btn-floating btn-small waves-effect waves-light right hoverable green"><i class="material-icons tiny">leak_add</i></button>' : '', | ||
infoBtn = (nwk) ? `<button name="info" class="left btn-flat btn-small"><i class="material-icons icon-blue">info</i></button>` : '', | ||
lq = (dev.link_quality > 0 && isActive) ? `<div class="col tool"><i id="${rid}_link_quality_icon" class="material-icons ${lqi_cls}">network_check</i><div id="${rid}_link_quality" class="center" style="font-size:0.7em">${dev.link_quality}</div></div>` |
Check warning
Code scanning / CodeQL
Missing variable declaration Warning
} | ||
const stateKey = arr[1]; | ||
this.warn('statekey is ' + stateKey + ', arr is ' + JSON.stringify(arr) + ' id was ' + id); | ||
if (typeof (this.debugDevices) != 'array') this.getDebugDevices(() => { |
Check failure
Code scanning / CodeQL
Useless type test Error
array
} | ||
if (!devStates) { | ||
if (has_debug) this.error(`ELEVATED IE2: no device states for device ${devId} type '${model}'`) | ||
if (has_elevated_debug) | ||
this.elevatedMessage(devId, `ELEVATED IE02: no device states for device ${devId} type '${model}'`, true) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
for (const stateInd in states) { | ||
const statedesc = states[stateInd]; | ||
let value; | ||
let extra_value = undefined; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
try { | ||
this.warn(`Pinging '${ieeeAddr}' (${device.modelID})`) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
const dev_block = $(this).parents('div.device'); | ||
const id = getDevId(dev_block); | ||
const name = getDevName(dev_block); | ||
toggleDebugDevice(id, name); |
Check warning
Code scanning / CodeQL
Superfluous trailing arguments Warning
function toggleDebugDevice
|
||
async function selectImageOverride(id) { | ||
const dev = devices.find((d) => d._id == id); | ||
let localImages = undefined; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
excludes.forEach(id => { | ||
// const b = devices.find((item) => item._id.contains(id)); | ||
const exclude_id = id.key; | ||
const exclude_icon = id.value; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
||
async getLocalImages(from, command, msg, callback) { | ||
if (this.stController) { | ||
const id = msg.id; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
||
function pairedLegacyDevices(candidates) { | ||
const rv = []; | ||
for (const candidate in legacy_devices) { |
Check failure
Code scanning / CodeQL
Unused loop iteration variable Error
} | ||
|
||
async updateDeviceImage(target, isGlobal, image) { | ||
const base = getOverrideData(target, isGlobal); |
Check failure
Code scanning / CodeQL
Missing 'this' qualifier Error
getOverrideData
@@ -6,7 +6,8 @@ | |||
const getZbId = require('./utils').getZbId; | |||
const fs = require('fs'); | |||
const axios = require('axios'); | |||
|
|||
const localConfig = require('./localConfig'); | |||
const { deviceAddCustomCluster } = require('zigbee-herdsman-converters/lib/modernExtend'); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
async renameDevice(id, newName) { | ||
const stateId = id.replace(`${this.adapter.namespace}.`, '') | ||
const obj = await this.adapter.getObjectAsync(id); | ||
if (newName == null || newName == undefined) newName = ''; |
Check notice
Code scanning / CodeQL
Unneeded defensive code Note
} | ||
|
||
verifyDeviceName(id, name) { | ||
const savedId = id.replace(`${this.adapter.namespace}.`, ''); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
await this.herdsman.stop(); | ||
} | ||
catch (error) { | ||
this.warn(`Starting zigbee-herdsman problem : ${error && error.message ? error.message : 'no error message'}`) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
No description provided.