Map<String, dynamic> toJson() { return { 'batteryLevel': batteryLevel, 'status': status.name, 'health': health.name, }; }