matterbridge-roborock-vacuum-plugin
Version:
Matterbridge Roborock Vacuum Plugin
23 lines (22 loc) • 611 B
JavaScript
import { DockInfo } from './dockInfo.js';
import { VacuumError } from './vacuumError.js';
export class DeviceStatus {
errorStatus;
message;
constructor(message) {
this.message = message[0];
this.errorStatus = new VacuumError(this.message.error_code, this.message.dock_error_status);
}
getBattery() {
return this.message.battery;
}
getVacuumErrorCode() {
return this.message.error_code;
}
getDockInfo() {
return new DockInfo(this.message.dock_type);
}
getDockErrorCode() {
return this.message.dock_error_status;
}
}