homebridge-netatmo-temperature 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/platform.js +1 -1
- package/package.json +1 -1
package/dist/platform.js
CHANGED
|
@@ -51,8 +51,8 @@ class NetatmoPlatform {
|
|
|
51
51
|
for (const mod of modules) {
|
|
52
52
|
const uuid = this.api.hap.uuid.generate(PLUGIN_NAME + '-' + mod.id);
|
|
53
53
|
let accessory = this.cachedAccessories.find(a => a.UUID === uuid);
|
|
54
|
+
const displayName = mod.name.replace(/[^a-zA-Z0-9 ']/g, '').replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ') || 'Netatmo Sensor';
|
|
54
55
|
if (!accessory) {
|
|
55
|
-
const displayName = mod.name.replace(/[^a-zA-Z0-9 ']/g, '').replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ') || 'Netatmo Sensor';
|
|
56
56
|
accessory = new this.api.platformAccessory(displayName, uuid);
|
|
57
57
|
newAccessories.push(accessory);
|
|
58
58
|
this.log.info('Adding new accessory:', displayName);
|