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.
Files changed (2) hide show
  1. package/dist/platform.js +1 -1
  2. 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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-netatmo-temperature",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Homebridge plugin for Netatmo weather station temperatures in Apple HomeKit",
5
5
  "license": "Apache-2.0",
6
6
  "author": "trama2000",