homey-lib
Advanced tools
Comparing version 1.0.17 to 1.0.18
@@ -9,2 +9,3 @@ "use strict"; | ||
const SignalValidator = require('homey-signal-validator'); | ||
const deviceclasses = require('../deviceclasses/index.js'); | ||
@@ -16,2 +17,3 @@ const allowedLocales = [ 'en', 'nl', 'de', 'es', 'fr' ]; | ||
const allowedDriverSettingsTypes = { | ||
'label' : 'string', | ||
'text' : 'string', | ||
@@ -468,4 +470,12 @@ 'password' : 'string', | ||
var capabilities = deviceclasses.getDeviceClasses().capabilities; | ||
for( let capabilityId in json.capabilities ) { | ||
// prevent system capability name collision | ||
if( typeof capabilities[ capabilityId] !== 'undefined' ) { | ||
error(`capabilities.${capabilityId}: invalid capability id, already a system capability`); | ||
continue; | ||
} | ||
var validateCapability = require('../deviceclasses/index.js').validateCapability; | ||
@@ -472,0 +482,0 @@ var isValid = validateCapability( json.capabilities[ capabilityId ] ); |
@@ -746,10 +746,9 @@ { | ||
}, | ||
"min": 0, | ||
"decimals": 2, | ||
"units": { | ||
"en": "Wh" | ||
"en": "KWh" | ||
}, | ||
"desc": { | ||
"en": "Power usage in Watts per Hour (Wh)", | ||
"nl": "Stroomverbuik in Watt per uur (Wh)" | ||
"en": "Power usage in KiloWatts per Hour (kWh)", | ||
"nl": "Stroomverbuik in KiloWatt per uur (kWh)" | ||
}, | ||
@@ -795,2 +794,19 @@ "getable": true, | ||
}, | ||
"meter_rain": { | ||
"type": "number", | ||
"title": { | ||
"en": "Rain Meter", | ||
"nl": "Regenmeter" | ||
}, | ||
"units": { | ||
"en": "m³" | ||
}, | ||
"desc": { | ||
"en": "Rain in Cubic Meter (m³)", | ||
"nl": "Regen in Kubieke Meter (m³)" | ||
}, | ||
"decimals": 2, | ||
"getable": true, | ||
"setable": false | ||
}, | ||
"homealarm_state": { | ||
@@ -797,0 +813,0 @@ "type": "enum", |
{ | ||
"name": "homey-lib", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "Library for Homey", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
94448
1478