Update zigbee-herdsman zigbee-shepherd-converters.

This commit is contained in:
Koen Kanters
2019-09-20 21:25:56 +02:00
parent d4f01e6893
commit 5b71eeeed8
4 changed files with 294 additions and 142 deletions
+8 -1
View File
@@ -64,6 +64,8 @@ class EntityPublish extends BaseExtension {
let converters = null;
let target = null;
let options = {};
let device = null;
let mapped = null;
assert(entity.type === 'device' || entity.type === 'group');
if (entity.type === 'device') {
@@ -74,6 +76,8 @@ class EntityPublish extends BaseExtension {
return;
}
device = entity.device;
mapped = entity.mapped;
target = entity.endpoint;
converters = entity.mapped.toZigbee;
options = entity.mapped.meta && entity.mapped.meta.options ? entity.mapped.meta.options : {};
@@ -102,8 +106,8 @@ class EntityPublish extends BaseExtension {
* the color temperature. This would lead to 2 zigbee publishes, where the first one
* (state) is probably unecessary.
*/
const deviceState = this.state.get(entity.settings.ID);
if (settings.get().homeassistant) {
const deviceState = this.state.get(entity.settings.ID);
const hasColorTemp = json.hasOwnProperty('color_temp');
const hasColor = json.hasOwnProperty('color');
const hasBrightness = json.hasOwnProperty('brightness');
@@ -139,6 +143,9 @@ class EntityPublish extends BaseExtension {
options,
message: json,
logger,
device,
state: deviceState,
mapped,
};
try {
+14 -1
View File
@@ -249,6 +249,18 @@ const configurations = {
},
// Light
'light_brightness_colortemp_colorxy_white': {
type: 'light',
object_id: 'light',
discovery_payload: {
brightness: true,
color_temp: true,
xy: true,
white_value: true,
schema: 'json',
command_topic: true,
},
},
'light_brightness_colortemp_colorxy': {
type: 'light',
object_id: 'light',
@@ -506,7 +518,7 @@ const mapping = {
configurations.binary_sensor_occupancy, configurations.sensor_temperature,
configurations.sensor_illuminance, configurations.sensor_battery,
],
'GL-C-008': [configurations.light_brightness_colortemp_colorxy],
'GL-C-008': [configurations.light_brightness_colortemp_colorxy_white],
'STSS-MULT-001': [configurations.binary_sensor_contact, configurations.sensor_battery],
'E11-G23/E11-G33': [configurations.light_brightness],
'E1ACA4ABE38A': [configurations.light_brightness],
@@ -899,6 +911,7 @@ const mapping = {
'SR-ZG9001K4-DIM2': [configurations.sensor_battery, configurations.sensor_click],
'ICZB-IW11SW': [configurations.switch],
'HV-GUCXZB5': [configurations.light_brightness_colortemp],
'HGZB-20A': [configurations.switch],
};
Object.keys(mapping).forEach((key) => {
+270 -138
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -43,8 +43,8 @@
"rimraf": "*",
"semver": "*",
"winston": "2.4.2",
"zigbee-herdsman": "0.6.14",
"zigbee-herdsman-converters": "11.1.0"
"zigbee-herdsman": "0.6.15",
"zigbee-herdsman-converters": "11.1.1"
},
"devDependencies": {
"eslint": "*",