diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index b8f790d83..640b58cd5 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -1198,6 +1198,7 @@ const mapping = { 'SGMHM-I1': [cfg.binary_sensor_gas, cfg.binary_sensor_battery_low, cfg.binary_sensor_tamper], 'STHM-I1H': [cfg.sensor_humidity, cfg.sensor_temperature, cfg.sensor_battery], 'BDHM8E27W70-I1': [cfg.light_brightness_colortemp], + 'M420': [cfg.sensor_battery], }; Object.keys(mapping).forEach((key) => { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 5de4f6bc4..35633db13 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -796,20 +796,20 @@ "dev": true }, "@typescript-eslint/experimental-utils": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz", - "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz", + "integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.18.0", + "@typescript-eslint/typescript-estree": "2.19.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz", - "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz", + "integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==", "dev": true, "requires": { "debug": "^4.1.1", @@ -3031,9 +3031,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.0.tgz", - "integrity": "sha512-Nm4wVHdo7ZXSG30KjZ2Wl5SU/Bw7bDx1PdaiIFzEStdjs0H12mOTncn1GVYuqQSaZxpg87VGBRsVRPGD2cD1AQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz", + "integrity": "sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg==", "dev": true, "requires": { "@babel/core": "^7.7.5", @@ -13445,9 +13445,9 @@ } }, "zigbee-herdsman-converters": { - "version": "12.0.16", - "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.16.tgz", - "integrity": "sha512-tyi2Jjyd8x4Zi4dBQFtHfAuqCQ0IaT2q8kba4fxLAvXhM0QWw3kePUHrVa6YDtURU/hFIGax7B4QTCCfr4KLOQ==", + "version": "12.0.17", + "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.17.tgz", + "integrity": "sha512-QjPpdfe6Hr/c73XbxJzbCWYRq2ixM2RQ3jvG9NRKmqqoScf+UJzwdJ7o5ZNX33iLtoL2DLr7gutbEdtpKehkpg==", "dependencies": { "@babel/code-frame": { "version": "7.5.5", diff --git a/package.json b/package.json index 756caab0e..869bb8bd9 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "semver": "*", "winston": "*", "zigbee-herdsman": "0.12.44", - "zigbee-herdsman-converters": "12.0.16" + "zigbee-herdsman-converters": "12.0.17" }, "devDependencies": { "eslint": "*", diff --git a/test/deviceReceive.test.js b/test/deviceReceive.test.js index 624b92737..9871342a7 100755 --- a/test/deviceReceive.test.js +++ b/test/deviceReceive.test.js @@ -242,7 +242,7 @@ describe('Device receive', () => { await flushPromises(); expect(MQTT.publish).toHaveBeenCalledTimes(1); expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/occupancy_sensor'); - expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({'battery': 100, 'illuminance': 381, "illuminance_lux": 0, 'voltage': 3045, linkquality: 10}); + expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({'battery': 100, 'illuminance': 381, "illuminance_lux": 381, 'voltage': 3045, linkquality: 10}); expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false}); });