zwave: default names on empty name devices

This commit is contained in:
Koushik Dutta
2022-02-27 12:56:02 -08:00
parent ab3a0fe9fd
commit 11213ea8b6
3 changed files with 4 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/zwave",
"version": "0.0.46",
"version": "0.0.47",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/zwave",
"version": "0.0.46",
"version": "0.0.47",
"license": "Apache",
"dependencies": {
"@scrypted/sdk": "file:../../sdk",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/zwave",
"version": "0.0.46",
"version": "0.0.47",
"description": "Z-Wave USB Controller for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -303,7 +303,7 @@ export class ZwaveControllerProvider extends ScryptedDeviceBase implements Devic
if (node.supportsCC(CommandClasses['Node Naming and Location'])) {
try {
const nodeNaming = instance.getNodeUnsafe().commandClasses["Node Naming and Location"];
name = await nodeNaming?.getName();
name = await nodeNaming?.getName() || 'Z-Wave Device';
}
catch (e) {
// have seen this fail, even though it is supposedly available