UNPKG

matterbridge-roborock-vacuum-plugin

Version:
23 lines (22 loc) 611 B
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; } }