@kala4ek/homebridge-starline
Version:
StarLine plugin for Homebridge
17 lines (13 loc) • 362 B
JavaScript
const AccessoryBaseClass = require('./AccessoryBaseClass');
module.exports = class Trunk extends AccessoryBaseClass {
constructor(hap, obj) {
super(hap, obj);
this.code = 'Trunk';
this.name = obj.name || 'Багажник';
this.type = 'ContactSensor';
this.init();
}
getAccessoryState(data) {
return data.car_state.trunk;
}
}