mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
d3f705162d
* Start on group support. #15 * Implement publishing to zigbee groups. https://github.com/Koenkk/zigbee2mqtt/issues/15 * Complete first version of group support. * Fix tests.
10 lines
377 B
JavaScript
10 lines
377 B
JavaScript
// Xiaomi uses 4151 and 4447 (lumi.plug) as manufacturer ID.
|
|
const xiaomiManufacturerID = [4151, 4447];
|
|
|
|
module.exports = {
|
|
millisecondsToSeconds: (milliseconds) => milliseconds / 1000,
|
|
secondsToMilliseconds: (seconds) => seconds * 1000,
|
|
isXiaomiDevice: (device) => xiaomiManufacturerID.includes(device.manufId),
|
|
isNumeric: (string) => /^\d+$/.test(string),
|
|
};
|