From d637ab04555afa8c49fc57700e5892f132c2546d Mon Sep 17 00:00:00 2001 From: HJD Date: Tue, 17 Aug 2021 14:25:29 -0500 Subject: [PATCH] Gracefully default model and brand information when they aren't known to us already. --- src/myq-accessory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/myq-accessory.ts b/src/myq-accessory.ts index bacab29..94aa8e1 100644 --- a/src/myq-accessory.ts +++ b/src/myq-accessory.ts @@ -81,8 +81,8 @@ export abstract class myQAccessory { // If we're able to lookup hardware information, use it. getHwInfo returns an object containing // device type and brand information. - gwProduct = gwInfo?.product; - gwBrand = gwInfo?.brand; + gwBrand = gwInfo?.brand ?? gwBrand; + gwProduct = gwInfo?.product ?? gwProduct; } // Update the manufacturer information for this device.