Update converters.

This commit is contained in:
Koen Kanters 2020-03-20 19:46:57 +01:00
parent 6cc2689593
commit ed37570ef0
3 changed files with 125 additions and 43 deletions

View File

@ -204,7 +204,7 @@ const cfg = {
object_id: 'power',
discovery_payload: {
unit_of_measurement: 'W',
icon: 'mdi:factory',
icon: 'mdi:flash',
value_template: '{{ value_json.power }}',
},
},
@ -213,7 +213,7 @@ const cfg = {
object_id: 'current',
discovery_payload: {
unit_of_measurement: 'A',
icon: 'mdi:power-plug',
icon: 'mdi:current-ac',
value_template: '{{ value_json.current }}',
},
},
@ -222,10 +222,19 @@ const cfg = {
object_id: 'voltage',
discovery_payload: {
unit_of_measurement: 'V',
icon: 'mdi:flash',
icon: 'mdi:alpha-v',
value_template: '{{ value_json.voltage }}',
},
},
'sensor_energy': {
type: 'sensor',
object_id: 'energy',
discovery_payload: {
unit_of_measurement: 'kW',
icon: 'mdi:power-plug',
value_template: '{{ value_json.energy }}',
},
},
'sensor_action': {
type: 'sensor',
object_id: 'action',
@ -1074,7 +1083,7 @@ const mapping = {
'9290018187B': [cfg.light_brightness_colortemp_colorxy],
'1741830P7': [cfg.light_brightness_colortemp_colorxy],
'Z3-1BRL': [cfg.sensor_action, cfg.sensor_brightness],
'HSIO18008': [cfg.binary_sensor_gas, cfg.binary_sensor_battery_low],
'HS1CG-E': [cfg.binary_sensor_gas, cfg.binary_sensor_battery_low],
'LED1842G3': [cfg.light_brightness],
'SR-ZG9001K4-DIM2': [cfg.sensor_battery, cfg.sensor_click],
'ICZB-IW11SW': [cfg.switch],
@ -1316,6 +1325,8 @@ const mapping = {
'U202SRY2KWZB': [switchWithPostfix('l1'), switchWithPostfix('l2')],
'93999': [cfg.light_brightness],
'HLC614-ZLL': [switchWithPostfix('l1'), switchWithPostfix('l2'), switchWithPostfix('l3')],
'EMIZB-132': [cfg.sensor_power, cfg.sensor_voltage, cfg.sensor_current, cfg.sensor_energy],
'S9ZGBRC01': [cfg.sensor_action, cfg.sensor_battery],
};
Object.keys(mapping).forEach((key) => {

147
npm-shrinkwrap.json generated
View File

@ -14,22 +14,23 @@
}
},
"@babel/core": {
"version": "7.8.7",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.7.tgz",
"integrity": "sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz",
"integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
"@babel/generator": "^7.8.7",
"@babel/helpers": "^7.8.4",
"@babel/parser": "^7.8.7",
"@babel/generator": "^7.9.0",
"@babel/helper-module-transforms": "^7.9.0",
"@babel/helpers": "^7.9.0",
"@babel/parser": "^7.9.0",
"@babel/template": "^7.8.6",
"@babel/traverse": "^7.8.6",
"@babel/types": "^7.8.7",
"@babel/traverse": "^7.9.0",
"@babel/types": "^7.9.0",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
"json5": "^2.1.0",
"json5": "^2.1.2",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
@ -51,12 +52,12 @@
}
},
"@babel/generator": {
"version": "7.8.8",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz",
"integrity": "sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.0.tgz",
"integrity": "sha512-onl4Oy46oGCzymOXtKMQpI7VXtCbTSHK1kqBydZ6AmzuNcacEVqGk9tZtAS+48IA9IstZcDCgIg8hQKnb7suRw==",
"dev": true,
"requires": {
"@babel/types": "^7.8.7",
"@babel/types": "^7.9.0",
"jsesc": "^2.5.1",
"lodash": "^4.17.13",
"source-map": "^0.5.0"
@ -90,12 +91,76 @@
"@babel/types": "^7.8.3"
}
},
"@babel/helper-member-expression-to-functions": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz",
"integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3"
}
},
"@babel/helper-module-imports": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz",
"integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3"
}
},
"@babel/helper-module-transforms": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz",
"integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.8.3",
"@babel/helper-replace-supers": "^7.8.6",
"@babel/helper-simple-access": "^7.8.3",
"@babel/helper-split-export-declaration": "^7.8.3",
"@babel/template": "^7.8.6",
"@babel/types": "^7.9.0",
"lodash": "^4.17.13"
}
},
"@babel/helper-optimise-call-expression": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz",
"integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3"
}
},
"@babel/helper-plugin-utils": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz",
"integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==",
"dev": true
},
"@babel/helper-replace-supers": {
"version": "7.8.6",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz",
"integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "^7.8.3",
"@babel/helper-optimise-call-expression": "^7.8.3",
"@babel/traverse": "^7.8.6",
"@babel/types": "^7.8.6"
}
},
"@babel/helper-simple-access": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz",
"integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==",
"dev": true,
"requires": {
"@babel/template": "^7.8.3",
"@babel/types": "^7.8.3"
}
},
"@babel/helper-split-export-declaration": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz",
@ -105,32 +170,38 @@
"@babel/types": "^7.8.3"
}
},
"@babel/helper-validator-identifier": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
"integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
"dev": true
},
"@babel/helpers": {
"version": "7.8.4",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz",
"integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.0.tgz",
"integrity": "sha512-/9GvfYTCG1NWCNwDj9e+XlnSCmWW/r9T794Xi58vPF9WCcnZCAZ0kWLSn54oqP40SUvh1T2G6VwKmFO5AOlW3A==",
"dev": true,
"requires": {
"@babel/template": "^7.8.3",
"@babel/traverse": "^7.8.4",
"@babel/types": "^7.8.3"
"@babel/traverse": "^7.9.0",
"@babel/types": "^7.9.0"
}
},
"@babel/highlight": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
"integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
"integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.9.0",
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^4.0.0"
}
},
"@babel/parser": {
"version": "7.8.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz",
"integrity": "sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.0.tgz",
"integrity": "sha512-Iwyp00CZsypoNJcpXCbq3G4tcDgphtlMwMVrMhhZ//XBkqjXF7LW6V511yk0+pBX3ZwwGnPea+pTKNJiqA7pUg==",
"dev": true
},
"@babel/plugin-syntax-bigint": {
@ -163,17 +234,17 @@
}
},
"@babel/traverse": {
"version": "7.8.6",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz",
"integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz",
"integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
"@babel/generator": "^7.8.6",
"@babel/generator": "^7.9.0",
"@babel/helper-function-name": "^7.8.3",
"@babel/helper-split-export-declaration": "^7.8.3",
"@babel/parser": "^7.8.6",
"@babel/types": "^7.8.6",
"@babel/parser": "^7.9.0",
"@babel/types": "^7.9.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.13"
@ -188,12 +259,12 @@
}
},
"@babel/types": {
"version": "7.8.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz",
"integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz",
"integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==",
"dev": true,
"requires": {
"esutils": "^2.0.2",
"@babel/helper-validator-identifier": "^7.9.0",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
@ -14811,9 +14882,9 @@
}
},
"zigbee-herdsman-converters": {
"version": "12.0.53",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.53.tgz",
"integrity": "sha512-tXVGpciUDMORmdjVPnnFJFbSVqg6Qkq/G3l80/3YtL5OX1+fZ0qCqlMKFrZMpu4wg7gRmrZqPiSD/KsMR17zKw==",
"version": "12.0.55",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.55.tgz",
"integrity": "sha512-XG7k1jFTJH21UQN1bIjL0Hi96iwfmz5c06sOD0lHL+fgCTpL6e1gHSiyrbCkjmmhYOjJyNG9abxCUxT9dynzbA==",
"requires": {
"axios": "*",
"tar-stream": "*"

View File

@ -46,7 +46,7 @@
"semver": "*",
"winston": "*",
"zigbee-herdsman": "0.12.65",
"zigbee-herdsman-converters": "12.0.53"
"zigbee-herdsman-converters": "12.0.55"
},
"devDependencies": {
"eslint": "*",