mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
Standardize multi-device discovery logic
This commit is contained in:
@@ -244,8 +244,8 @@ async function updateRingData(mqttClient, ringClient) {
|
||||
debug(colors.white(`${indent}│ `)+colors.gray(ringDevice.device.deviceType))
|
||||
let keys = Object.keys(ringDevice.childDevices).length
|
||||
Object.keys(ringDevice.childDevices).forEach(key => {
|
||||
debug(colors.white(`${indent}${(keys > 1) ? '├─: ' : '└─ '}`)+colors.green(`${ringDevice.childDevices[key].name}`)+colors.cyan(` (${ringDevice.childDevices[key].id})`))
|
||||
debug(colors.white(`${indent}${(keys > 1) ? '│ ' : ' '}`)+colors.gray(ringDevice.childDevices[key].deviceType))
|
||||
debug(colors.white(`${indent}${(keys > 1) ? '├─: ' : '└─: '}`)+colors.green(`${ringDevice.childDevices[key].name}`)+colors.cyan(` (${ringDevice.childDevices[key].id})`))
|
||||
debug(colors.white(`${indent}${(keys > 1) ? '│ ' : ' '}`)+colors.gray(ringDevice.childDevices[key].deviceType))
|
||||
keys--
|
||||
})
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user