- 积分
- 946
- 金钱
- 878
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 946
- 金钱
- 878
- HASS币
- 0
|
楼主 |
发表于 2021-7-23 13:26:48
|
显示全部楼层
按照官方文档修改了一个,不行啊
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['ZHA-OccupancySen'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
model: 'diy', // Vendor model number, look on the device for a model number
vendor: 'diy', // Vendor of the device (only used for documentation and startup logging)
description: 'Contact sensor', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
fromZigbee: [fz.ias_contact_alarm_1, fz.battery], // We will add this later
toZigbee: [], // Should be empty, unless device can be controlled (e.g. lights, switches).
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()], // Defines what this device exposes, used for e.g. Home Assistant discovery and in the frontend
};
module.exports = definition; |
|