Skip to content

Commit

Permalink
Release 2.11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jghaanstra committed Apr 14, 2019
1 parent 7ef200f commit d5e645b
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 30 deletions.
5 changes: 3 additions & 2 deletions APPSTORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ 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.4 - 2019-03-03
* FIX: fixed a bug in the pairing of Yeelights which was introduced in the previous release
### v2.11.5 - 2019-04-14
* NEW: support for Yeelight Meteorite Pendant Light (YLDL01YL)
* NEW: condition card for night mode for Yeelights that support this feature
16 changes: 11 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ class XiaomiMiioApp extends Homey.App {
onInit() {
this.log('Initializing Xiaomi Mi Home app ...');

// YEELIGHTS: ACTION FLOW CARDS
// YEELIGHTS: CONDITION AND ACTION FLOW CARDS
new Homey.FlowCardCondition('yeelightNightmode')
.register()
.registerRunListener((args, state) => {
return args.device.getCapabilityValue('night_mode');
})

new Homey.FlowCardAction('yeelightDefault')
.register()
.registerRunListener((args, state) => {
Expand Down Expand Up @@ -101,8 +107,8 @@ class XiaomiMiioApp extends Homey.App {
// MI AIR PURIFIER: CONDITION AND ACTION FLOW CARDS
new Homey.FlowCardCondition('poweredAirpurifier')
.register()
.registerRunListener((args, state, callback) => {
callback(null, args.device.getCapabilityValue('onoff'))
.registerRunListener((args, state) => {
return args.device.getCapabilityValue('onoff');
})

new Homey.FlowCardAction('modeAirpurifier')
Expand Down Expand Up @@ -154,8 +160,8 @@ class XiaomiMiioApp extends Homey.App {
// MI HUMDIFIER: CONDITION AND ACTION FLOW CARDS
new Homey.FlowCardCondition('poweredHumidifier')
.register()
.registerRunListener((args, state, callback) => {
callback(null, args.device.getCapabilityValue('onoff'))
.registerRunListener((args, state) => {
return args.device.getCapabilityValue('onoff');
})

new Homey.FlowCardAction('modeHumidifier')
Expand Down
20 changes: 19 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.4",
"version": "2.11.5",
"compatibility": ">=2.0.0",
"author": {
"name": "Jelger Haanstra",
Expand Down Expand Up @@ -780,6 +780,24 @@
}
],
"conditions": [
{
"id": "yeelightNightmode",
"title": {
"en": "Night Mode !{{is|is not}} on",
"nl": "Nacht modus !{{is|is niet}} aan"
},
"args": [
{
"name": "device",
"type": "device",
"placeholder": {
"en": "Select Yeelight",
"nl": "Selecteer Yeelight"
},
"filter": "driver_id=yeelights&capabilities=night_mode"
}
]
},
{
"id": "poweredAirpurifier",
"title": {
Expand Down
20 changes: 1 addition & 19 deletions drivers/yeelights/assets/bslamp2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions drivers/yeelights/assets/ceiling10.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions drivers/yeelights/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const typeCapabilityMap = {
'ceiling2' : [ 'onoff', 'dim', 'light_temperature', 'light_mode', 'night_mode' ],
'ceiling3' : [ 'onoff', 'dim', 'light_temperature', 'light_mode', 'night_mode' ],
'ceiling4' : [ 'onoff', 'dim', 'light_hue', 'light_saturation', 'light_temperature', 'light_mode', 'night_mode' ],
'ceiling10' : [ 'onoff', 'dim', 'light_hue', 'light_saturation', 'light_temperature', 'light_mode' ],
'desklamp' : [ 'onoff', 'dim', 'light_temperature', 'light_mode' ]
}

Expand All @@ -38,6 +39,7 @@ const typeIconMap = {
'ceiling2' : 'ceiling.svg',
'ceiling3' : 'ceiling.svg',
'ceiling4' : 'ceiling4.svg',
'ceiling10' : 'ceiling10.svg',
'desklamp' : 'desklamp.svg'
}

Expand All @@ -63,10 +65,14 @@ class YeelightDriver extends Homey.Driver {
} else if (result[i].model.startsWith('bslamp')) {
var name = Homey.__('yeelight_bedside_lamp')+ ' (' + result[i].address + ')';
} else if (result[i].model.startsWith('ceiling')) {
if(result[i].model !== 'ceiling4') {
if(result[i].model !== 'ceiling4' || result[i].model !== 'ceiling10') {
result[i].model = 'ceiling';
}
var name = Homey.__('yeelight_ceiling_light')+ ' (' + result[i].address + ')';
if (result[i].model == 'ceiling10') {
var name = Homey.__('yeelight_meteorite_light')+ ' (' + result[i].address + ')';
} else {
var name = Homey.__('yeelight_ceiling_light')+ ' (' + result[i].address + ')';
}
} else if (result[i].model == 'desklamp') {
var name = Homey.__('yeelight_desklamp')+ ' (' + result[i].address + ')';
}
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"yeelight_led_stripe": "Yeelight LED Strip",
"yeelight_bedside_lamp": "Yeelight Bedside Lamp",
"yeelight_ceiling_light": "Yeelight Ceiling Light",
"yeelight_meteorite_light": "Yeelight Meteorite Light",
"yeelight_desklamp": "Yeelight Desk Lamp",
"unreachable": "Offline"
}
1 change: 1 addition & 0 deletions locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"yeelight_led_strip": "Yeelight LED strip",
"yeelight_bedside_lamp": "Yeelight Nachtlamp",
"yeelight_ceiling_light": "Yeelight Plafondlamp",
"yeelight_meteorite_light": "Yeelight Meteorite Lamp",
"yeelight_desklamp": "Yeelight Bureau Lamp",
"unreachable": "Niet beschikbaar"
}
1 change: 1 addition & 0 deletions node_modules/miio/lib/models.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions node_modules/miio/lib/network.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.xiaomi-miio",
"version": "2.11.4",
"version": "2.11.5",
"description": "Xiaomi Mi Home",
"main": "app.js",
"dependencies": {
Expand Down

0 comments on commit d5e645b

Please sign in to comment.