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
26 lines (22 loc) • 702 B
JavaScript
const BTSensor = require("../BTSensor");
class UNKNOWN extends BTSensor{
static isSystem = true
static identify(device){
return null
}
async init(){
await super.init()
if (!this.currentProperties.Name)
this.currentProperties.Name= `Unknown device from ${this.getManufacturer()}`
this.addParameter(
"sensorClass",
{
title: "Sensor Class",
enum: Array.from(this.constructor.classMap.keys()),
enumNames: (Array.from(this.constructor.classMap.values()).map((cls)=>{return cls.DisplayName()}))
}
)
this.listen()
}
}
module.exports=UNKNOWN