From 7cfcfa4ee1867782359831c354ca756447511b51 Mon Sep 17 00:00:00 2001 From: jghaanstra Date: Sat, 20 Mar 2021 11:44:39 +0100 Subject: [PATCH] Release 3.0.28 --- .homeychangelog.json | 3 +++ .homeycompose/app.json | 2 +- app.json | 2 +- drivers/shellydimmer/device.js | 6 ++---- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.homeychangelog.json b/.homeychangelog.json index e288bf6d..50a01456 100644 --- a/.homeychangelog.json +++ b/.homeychangelog.json @@ -205,5 +205,8 @@ }, "3.0.27": { "en": "Switch to unicast for Shelly devices with firmware 1.10.0 or higher for better network compatibility (please enable CoAP again in the app settings if you have previously disabled it), also added HTTP polling every minute as backup and fixed an issue with pairing of the Shelly Vintage." + }, + "3.0.28": { + "en": "Fixed an issue with the Shelly Dimmer 1 (added a workaround due to not using semantic versioning in firmware version of the Shelly Dimmer 1)" } } diff --git a/.homeycompose/app.json b/.homeycompose/app.json index e9f60fa0..bcec7a8b 100644 --- a/.homeycompose/app.json +++ b/.homeycompose/app.json @@ -53,7 +53,7 @@ "Shelly motion" ] }, - "version": "3.0.27", + "version": "3.0.28", "compatibility": ">=5.0.0", "author": { "name": "Jelger Haanstra", diff --git a/app.json b/app.json index 306e5cf6..94817aef 100644 --- a/app.json +++ b/app.json @@ -54,7 +54,7 @@ "Shelly motion" ] }, - "version": "3.0.27", + "version": "3.0.28", "compatibility": ">=5.0.0", "author": { "name": "Jelger Haanstra", diff --git a/drivers/shellydimmer/device.js b/drivers/shellydimmer/device.js index ea54460a..eae662b4 100644 --- a/drivers/shellydimmer/device.js +++ b/drivers/shellydimmer/device.js @@ -2,7 +2,6 @@ const Homey = require('homey'); const Util = require('/lib/util.js'); -const semver = require('semver'); const callbacks = [ 'shortpush', 'longpush' @@ -192,12 +191,11 @@ class ShellyDimmerDevice extends Homey.Device { } // update unicast - const version = result.update.old_version.match(/v([0-9a-z.-]+)/)[1]; - if (semver.gt(version, '1.9.6') && !this.getStoreValue('unicast') === true) { + if (!this.getStoreValue('unicast') === true) { const result = await this.util.setUnicast(this.getSetting('address'), this.getSetting('username'), this.getSetting('password')); if (result === 'OK') { this.setStoreValue("unicast", true); - } + } } } catch (error) { diff --git a/package-lock.json b/package-lock.json index c3260072..40aaa661 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cloud.shelly", - "version": "3.0.27", + "version": "3.0.28", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 490a4205..04865e02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloud.shelly", - "version": "3.0.27", + "version": "3.0.28", "description": "Homey app for controlling Shelly devices", "main": "app.js", "scripts": {