diff --git a/APPSTORE.md b/APPSTORE.md index a7c9080..4831778 100644 --- a/APPSTORE.md +++ b/APPSTORE.md @@ -27,6 +27,5 @@ For Homey to be able to communicate with devices over the miIO protocol a unique Xiaomi has released an update for the vacuum cleaners that enables zone cleaning and goto function. Using the action cards that utilize these functions are a bit challenging. If you want to use these cards please read the instructions [here](https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/mirobot_zonecleanup.md). ## Changelog -### v2.11.8 - 2019-05-10 -* NEW: add action card for setting LED display brightness of Air Purifier and Humidifier2 -* IMPROVEMENT: deprecated duplicate on / off action cards for Air Purifier and Humidifier 1 & 2 +### v2.11.9 - 2019-05-21 +* FIX: fix action card for setting LED display brightness of Air Purifier and Humidifier2 diff --git a/app.js b/app.js index d4e1ad0..111e6c1 100644 --- a/app.js +++ b/app.js @@ -182,6 +182,16 @@ class XiaomiMiioApp extends Homey.App { } }) + new Homey.FlowCardAction('ledAirpurifierHumidifier') + .register() + .registerRunListener((args, state) => { + if (args.device.miio) { + return args.device.miio.changeLEDBrightness(args.brightness); + } else { + return Promise.reject(new Error('Device unreachable, please try again ...')); + } + }) + /* DEPRECATED */ new Homey.FlowCardAction('humidifierOn') .register() @@ -205,15 +215,6 @@ class XiaomiMiioApp extends Homey.App { } }) - new Homey.FlowCardAction('ledAirpurifierHumidifier') - .register() - .registerRunListener((args, state) => { - if (args.device.miio) { - return args.device.miio.changeLEDBrightness(Number(args.brightness)); - } else { - return Promise.reject(new Error('Device unreachable, please try again ...')); - } - }) // PHILIPS EYECARE LAMP: CONDITION AND ACTION FLOW CARDS new Homey.FlowCardAction('enableEyecare') diff --git a/app.json b/app.json index 7599b78..2d49eea 100644 --- a/app.json +++ b/app.json @@ -10,7 +10,7 @@ "en": [ "Xiaomi", "Mi", "Mi Home", "miio", "vacuumcleaner", "robot", "yeelight", "yeelights", "purifier", "humidifier", "philips", "eyecare", "powerplug", "gateway" ], "nl": [ "Xiaomi", "Mi", "Mi home", "miio", "stofzuiger", "robot", "yeelight", "yeelights", "luchtreiniger", "luchtbevochtiger", "philips", "eyecare", "powerplug", "gateway" ] }, - "version": "2.11.8", + "version": "2.11.9", "compatibility": ">=2.0.0", "author": { "name": "Jelger Haanstra", @@ -1340,21 +1340,21 @@ "type": "dropdown", "values": [ { - "id": "0", + "id": "bright", "label": { "en": "Bright", "nl": "Helder" } }, { - "id": "1", + "id": "dim", "label": { "en": "Dim", "nl": "Gedimd" } }, { - "id": "2", + "id": "off", "label": { "en": "Off", "nl": "Uit" diff --git a/package.json b/package.json index f96036e..bdd0e81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.xiaomi-miio", - "version": "2.11.8", + "version": "2.11.9", "description": "Xiaomi Mi Home", "main": "app.js", "dependencies": {