Update zigbee-herdsman-converters to 12.0.198 (#4551)

* Update zigbee-herdsman-converters to 12.0.198

* Update homeassistant.js

* Update publish.test.js

* Update publish.test.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
github-actions[bot] 2020-10-04 00:32:43 +02:00 committed by GitHub
parent 9df1ea4359
commit 57b5529cd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 10 deletions

View File

@ -311,6 +311,15 @@ const cfg = {
value_template: '{{ value_json.temperature }}',
},
},
'sensor_soil_moisture': {
type: 'sensor',
object_id: 'soil_moisture',
discovery_payload: {
unit_of_measurement: '%',
icon: 'mdi:water-percent',
value_template: '{{ value_json.soil_moisture }}',
},
},
'sensor_device_temperature': {
type: 'sensor',
object_id: 'device_temperature',
@ -1434,6 +1443,11 @@ const manualMaping = {
'ZG2835': [cfg.sensor_action],
'CTR.UBX': [cfg.sensor_action],
'4655BC0-R': [cfg.binary_sensor_contact, cfg.binary_sensor_battery_low],
'STSS-IRM-001': [cfg.binary_sensor_occupancy, cfg.binary_sensor_battery_low],
'DIYRuZ_Flower': [
cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_illuminance, cfg.sensor_pressure,
cfg.sensor_battery, cfg.sensor_soil_moisture,
],
};
const defaultStatusTopic = 'homeassistant/status';

6
npm-shrinkwrap.json generated
View File

@ -15837,9 +15837,9 @@
}
},
"zigbee-herdsman-converters": {
"version": "12.0.197",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.197.tgz",
"integrity": "sha512-Pjnrg2e0/tHYrryE2EPm+ZDL8IF/j7T6eCvHAgOzNuMoBqXweC86HUY3sb9LtKuXl5zZEHspFAQbh42YCo8jWg==",
"version": "12.0.198",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.198.tgz",
"integrity": "sha512-5ezoCfnJ0vVWukQvBrlk1zzj89bzMIIYq2iVULxKXQVFo1BiREcXPaoBgDJATpPo8VmxKQKIWvUFUwbOYLFybg==",
"requires": {
"axios": "^0.20.0",
"https-proxy-agent": "^5.0.0",

View File

@ -53,7 +53,7 @@
"winston-syslog": "^2.4.4",
"ws": "^7.3.1",
"zigbee-herdsman": "0.13.12",
"zigbee-herdsman-converters": "12.0.197",
"zigbee-herdsman-converters": "12.0.198",
"zigbee2mqtt-frontend": "0.2.21"
},
"devDependencies": {

View File

@ -282,10 +282,10 @@ describe('Publish', () => {
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({color: {r: 100, g: 200, b: 10}}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColor", {colorx: 16764, colory: 40979, transtime: 0}, {});
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColor", {colorx: 17721, colory: 43148, transtime: 0}, {});
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/bulb_color');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({color_temp: 162, color: {x: 0.2558, y: 0.6253}});
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({color_temp: 157, color: {x: 0.2704, y: 0.6584}});
});
it('Should publish messages to zigbee devices with color rgb', async () => {
@ -294,10 +294,10 @@ describe('Publish', () => {
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({color: {rgb: '100,200,10'}}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColor", {colorx: 16764, colory: 40979, transtime: 0}, {});
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColor", {colorx: 17721, colory: 43148, transtime: 0}, {});
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/bulb_color');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({color_temp: 162, color: {x: 0.2558, y: 0.6253}});
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({color_temp: 157, color: {x: 0.2704, y: 0.6584}});
});
it('Should publish messages to zigbee devices with color rgb', async () => {
@ -524,10 +524,10 @@ describe('Publish', () => {
await MQTT.events.message('zigbee2mqtt/bulb_color/set/color', '#64C80A');
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColor", {colorx: 16764, colory: 40979, transtime: 0}, {});
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColor", {colorx: 17721, colory: 43148, transtime: 0}, {});
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/bulb_color');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({color_temp: 162, color: {x: 0.2558, y: 0.6253}});
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({color_temp: 157, color: {x: 0.2704, y: 0.6584}});
});
it('Should parse set with ieeeAddr topic', async () => {