@kala4ek/homebridge-starline
Version:
StarLine plugin for Homebridge
18 lines (14 loc) • 369 B
JavaScript
const AccessoryBaseClass = require('./AccessoryBaseClass');
module.exports = class Poke extends AccessoryBaseClass {
constructor(hap, obj) {
super(hap, obj);
this.code = 'Poke';
this.name = obj.name || 'Гудок';
this.type = 'Switch';
this.key = 'poke';
this.init();
}
getAccessoryState(data) {
return data.car_state.poke;
}
}