UNPKG

bt-sensors-plugin-sk

Version:

Bluetooth Sensors for Signalk - see https://www.npmjs.com/package/bt-sensors-plugin-sk#supported-sensors for a list of supported sensors

30 lines (25 loc) 667 B
const BTSensor = require("../../BTSensor"); class AranetSensor extends BTSensor{ COLOR = { 1: 'Green', 2: 'Yellow', 3: 'Red' } constructor(device, config={}){ super(device, config) } static async identify(device){ const md = await this.getDeviceProp(device,"ManufacturerData") if (md && md[0x0702]) { return this } return null } static Domain = BTSensor.SensorDomains.environmental static batteryStrengthTag="battery" initSchema(){ super.initSchema() this.addDefaultParam("zone") } } module.exports=AranetSensor